Re: [PHP-GTK] Chinese char input , almost there

[email protected] ("Steph") Fri, 10 Aug 2001 01:48:27 +0100
Newsgroups php.gtk
Message-ID <043801c12136$2eb74d80$2a29073e@t2r1o8>
OK so let's ask the guy who wrote the locale-handling patch, it may have been affected by changes since then maybe?

- that's Alexander. 

----- Original Message ----- 
From: "Jonce Huang" <[email protected]>
To: <[email protected]>
Cc: "Frank M. Kromann" <[email protected]>
Sent: Thursday, August 09, 2001 11:07 PM
Subject: [PHP-GTK] Chinese char input , almost there



Sorry to trouble you all again. I am almost there!

I found something why (php-)gtk entry not access Chinese
on ext\gtk+\phpgtk+.c  line  112 :
        get_set_locale();
and Accoding http://developer.gnome.org/doc/API/gtk/gtk-general.html#GTK-SET-LOCALE
--------------------------------------------------------------------------------------
gtk_set_locale ()
gchar*      gtk_set_locale                  (void);

Sets the current locale according to the program environment. This is the same as calling the libc function setlocale(LC_ALL, "")
but also takes care of the locale specific setup of the windowing system used by GDK.

You should call this function before gtk_init to support internationalization of your GTK+ applications.

Returns : A string corresponding to the locale set.
--------------------------------------------------------------------------------------
I just almost there, please give me a little help.

1. Can you save the return value of "gtk_set_locale()" into public memory var like:
   PHP_LC_ALL or anyelse. In order to know which locale now GTK think it is.

2. How to *change locale* for (php-)gtk in windows system?
   My locale is traditional Chinese and under linux is set to "zh_TW"
   a. I just need special version of gtk .dlls?
   b. I just need call some function at start of php?
   c. I just need SET <Something>=zh_TW on C:\AUTOEXEC.BAT?
   d. some other way else?

Thanks for your kindness and sorry for english is not my mother language.



----- Original Message -----
Jonce, I think the only person who can help you will be Frank Kromann, who probably just hasn't noticed your first message.

Forwarding, but I don't know when he'll be around.

----- Original Message -----
From: "Jonce Huang" <[email protected]>
To: <[email protected]>
Sent: Thursday, August 09, 2001 8:45 AM
Subject: [PHP-GTK] Sorry again, I do need help


Sorry for my English again.
I think my poor English made no one anwser my question.
Here again:

php -f  gtk.php

after i clicked "entry" button,  it showed a window
with a GtkEntry and a GtkCombo  for text input

I try to input Chinese -->no way -->show no char
I try to input English or digit --> ok show char right

so I do the follow test.
           .
           .
I try [Alt]+[1][2][3]  -->ok show char (ascii 123)
I try [Alt]+[1][2][4]  -->ok show char (ascii 124)
I try [Alt]+[1][2][5]  -->ok show char (ascii 125)
I try [Alt]+[1][2][6]  -->ok show char (ascii 126)
I try [Alt]+[1][2][7]  -->ok show char (ascii 127)
I try [Alt]+[1][2][8]  -->no way -->show no char
I try [Alt]+[1][2][9]  -->no way -->show no char
I try [Alt]+[1][3][0]  -->no way -->show no char
           .
           .
so I think  somewhere have made a misttake , to cancel all char ascii >127
on GtkEntry and GtkCombo. Please I do need help

----- Original Message -----



download 0.1 from the web and copy system32\ to windows\system32
test everything is ok but Chinese input
entry combobox can input ascii>127

gtk+ or php make this problem?

ps. most chinese use two bye for char code
    and hi-byte always > 127 to make sure not a nomal latin char

sorry for my english




--
PHP GTK Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
To contact the list administrators, e-mail: [email protected]



--
PHP GTK Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
To contact the list administrators, e-mail: [email protected]




-- 
PHP GTK Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
To contact the list administrators, e-mail: [email protected]