RE: [PHP] Re: Unicode translation
I'm not quite following this and I'm not sure what exactly you're having a problem with, but I'll try to explain some stuff that it looks like will help. Unicode(UTF-8) is a variable multi-byte format. Each character is represented by 1 to 4 bytes, UTF-8 character number 0x108(264) happens to require 2 bytes. So, if anything is trying to read UTF-8 characters with the rules for a single byte character set you will see the C Circumflex as two separate characters. UTF-8 should display fine on web page if you set the charset (like the previous emails incstructed you too) and the users OS supports UTF-8 (Windows 2000 and XP do, probably the recent flavors of linux as well). ISO-8859-1 (Which is the most prevalent character set on the internet) is single-byte. UTF-8 and ISO-8859-1 do share characters, Every character from 0x00(0) to 0x7f(127) in ISO-8859-1 is a single byte character in UTF-8, with the same nubmer. So if you are trying to display one of these characters in the other format, it will appear normal, while all UTF-8 characters 0x80(128) and above will be different and not display correctly. Are you just trying to store data to be able to retrieve it later? A block of text submitted to a webform maintains the character set of the webpage that submitted it (at least in my experience, there may be some exceptions to this though it is dependant on the browser). So you shouldn't have any problems displaying the data if the character set on the submitting page and displaying page are identical. If a character doesn't fall into a particular character set, there is no way to store it. UTF-8 is a good catch all because it can handle just about any character out there. Plenty of information about Unicode can be found here: http://www.unicode.org/ Chris -Original Message- From: Louie Miranda [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 9:21 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Unicode translation Yes, i just learned that windows uses a decimal code and there is a hex value too. Well, since some unicode characters dont have a decimal value, its really getting harder to solve this kind of problems. :( -- - Louie Miranda http://www.axishift.com - Original Message - "Luke" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > no, but on windows, you should be able to access most of them (depending on > the font) by using ALT+(number pad code) > eg ALT+(num pad)0169 gives you -> © > > Luke > > -- > Luke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Unicode translation
Yes, i just learned that windows uses a decimal code and there is a hex value too. Well, since some unicode characters dont have a decimal value, its really getting harder to solve this kind of problems. :( -- - Louie Miranda http://www.axishift.com - Original Message - "Luke" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > no, but on windows, you should be able to access most of them (depending on > the font) by using ALT+(number pad code) > eg ALT+(num pad)0169 gives you -> © > > Luke > > -- > Luke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Unicode translation
no, but on windows, you should be able to access most of them (depending on the font) by using ALT+(number pad code) eg ALT+(num pad)0169 gives you -> © Luke -- Luke "Louie Miranda" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Does all unicode characters have an equivalent key-stroke? and in even > different fonts? > > > -- - > Louie Miranda > http://www.axishift.com > > > - Original Message - > From: "Leif K-Brooks" <[EMAIL PROTECTED]> > To: "Luke" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Wednesday, December 03, 2003 11:52 AM > Subject: Re: [PHP] Re: Unicode translation > > > > Luke wrote: > > > > >Yeah, i had a similar problem, i dont know if its the same, but i found > that > > >adding > > > > > >in the head of the html output fixed it > > > > > > > > Even better, use header('Content-Type: text/html; charset=UTF-8') at the > > beginning of your PHP page. > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Unicode translation
Does all unicode characters have an equivalent key-stroke? and in even different fonts? -- - Louie Miranda http://www.axishift.com - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: "Luke" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, December 03, 2003 11:52 AM Subject: Re: [PHP] Re: Unicode translation > Luke wrote: > > >Yeah, i had a similar problem, i dont know if its the same, but i found that > >adding > > > >in the head of the html output fixed it > > > > > Even better, use header('Content-Type: text/html; charset=UTF-8') at the > beginning of your PHP page. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Unicode translation
Luke wrote: Yeah, i had a similar problem, i dont know if its the same, but i found that adding in the head of the html output fixed it Even better, use header('Content-Type: text/html; charset=UTF-8') at the beginning of your PHP page. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Unicode translation
Yeah, i had a similar problem, i dont know if its the same, but i found that adding in the head of the html output fixed it Luke - Original Message - From: "Louie Miranda" <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]> Sent: Wednesday, December 03, 2003 2:09 PM Subject: Unicode translation > Guys, > > A problem arised on my application when a user enters a Unicode format code > on the site. Well, we really catch every information and i really need to > get some explanation about it. > > ex: > > C = U+0108: Latin Capital Letter C With Circumflex > > Now this unicode character does not have any keystroke on my computer, i > only have "Character Map (Windows)" to generate this. > > On my php form i can type this clearly, but once preview it changes the > character to Í or something similar (I guess). > > But when i used a Unicode character that has a keystroke value ë for example > once preview it generates the correct character. > > Any bright ideas on this? > > > -- - > Louie Miranda > http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php