wekkaw Posted March 14, 2006 Share Posted March 14, 2006 Hi, I tried to store Unicode characters into an array and retrieve them, but all I'm getting is "?"s instead of the Unicode characters I put in the code.I typed the Unicode characters in MS-Word and past the values into my PHP code as seen below:[code]<?php$tempArray = array('?','?','?','?','?','?','?','?');?>[/code]As you can see the array converts the Unicode chars to "?". What should I do to store the actual Unicode chars? Btw, the Unicode chars I'm trying to store into the array are between U+1200 to U+1370F. I've also set the page charset to UTF-8.[code]<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><?phpmy code goes here ....?>[/code]I appreciate in advance for any help you can give me. week Quote Link to comment Share on other sites More sharing options...
thx967 Posted March 14, 2006 Share Posted March 14, 2006 I just finished translating a site from english to chinese and ran into a similar problem when my translator sent over his work in MS word. I suggest using note pad or a text editor other than ms word. you'll also need to make sure your database is set to handle utf code as well and your php pages are also encoded for it. Quote Link to comment Share on other sites More sharing options...
wekkaw Posted March 14, 2006 Author Share Posted March 14, 2006 [!--quoteo(post=355007:date=Mar 14 2006, 02:12 PM:name=thx967)--][div class=\'quotetop\']QUOTE(thx967 @ Mar 14 2006, 02:12 PM) [snapback]355007[/snapback][/div][div class=\'quotemain\'][!--quotec--]I just finished translating a site from english to chinese and ran into a similar problem when my translator sent over his work in MS word. I suggest using note pad or a text editor other than ms word. you'll also need to make sure your database is set to handle utf code as well and your php pages are also encoded for it.[/quote]Thanks for your response thx967. I found out that since PHP doesn't support unicode, if I store the unicode values into an array in HTML entities form and set my page charset to UTF-8, it works just fine. For example for unicode char U+1200 I would store 'ሀ' . Thanks again. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.