RE: UTF8 and Chinese
UTF-8 works fine with Chinese and everything else. I am doing it. It can be used, and I do use it, on each JSP page no matter what the language. I am presently using 19 which all work fine with UTF-8. I wondered about that. And, I am not saying that UTF-8 is always the way to go. But it does work. The problem was not the UTF-8 but getting a physical Font address. For Hebrew and other Arabic languages I had to reference LucidaSans which is with the jre and for the Eastern language I used Arial Unicode MS. One can use the Netscape font too, which is Bitsteam Cyberbit. Unfortunately, I had to work this out on my own. Wish I had gotten more interest, but I have to admit I did not approach the list intelligently with this request. I just assumed that people would figure out why I was on the list rather than the reverse. Oh well, live and learn. My mistake. Thank you for this interest. If you have any further interest, please feel free to contact me personally. I have it all working acey duecy as of today. Michael At 01:42 AM 5/17/2004, Kransen, J. wrote: Anyone tell me if I'm wrong, but I doubt if UTF-8 covers Chinese. As I see it, it only contains 8 bits per character, instead of ASCII's 7 bits, and for that reason I assume it only covers 2* the number of chars. Maybe you can try UTF-16 instead? Jeroen > -Oorspronkelijk bericht- > Van: Michael McGrady [mailto:[EMAIL PROTECTED] > Verzonden: zondag 16 mei 2004 17:47 > Aan: Struts Users Mailing List > Onderwerp: UTF8 and Chinese > > I am trying to use the image tags from Commons sandbox taglibs. I am > trying to use them with Chinese. The Western European languages work fine > with them, but the same thing does not work with Chinese. I am doing the > following, in essence: > > // Welcome in Chinese > String original = new String("\u6b22\u8fce"); > > and > // "Welcome" in Chinese > String original = new String("\u6b22\u8fce"); > byte[] utf8Bytes = original.getBytes("UTF8"); > original = new String(utf8Bytes,"UTF8"); > > Neither works. I just get the proverbial square boxes on the resultant > images. Anyone have any ideas? > > Thanks, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: UTF8 and Chinese
Hello Jeroen, On Monday 17 May 2004 10:42, Kransen, J. wrote: > Anyone tell me if I'm wrong, but I doubt if UTF-8 covers Chinese. As I see > it, it only contains 8 bits per character, instead of ASCII's 7 bits, and > for that reason I assume it only covers 2* the number of chars. Maybe you > can try UTF-16 instead? You are wrong. By default UTF-8 uses 1 byte per character. It uses a special character to indicates that the next character is 'high' and stored in 2 bytes. This makes a total of 3 bytes for a 'high' character. So UTF-8 is a good choice for western languages with normally only a few 'high' characters in the document. > Jeroen Regards, Cees. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: UTF8 and Chinese
Anyone tell me if I'm wrong, but I doubt if UTF-8 covers Chinese. As I see it, it only contains 8 bits per character, instead of ASCII's 7 bits, and for that reason I assume it only covers 2* the number of chars. Maybe you can try UTF-16 instead? Jeroen > -Oorspronkelijk bericht- > Van: Michael McGrady [mailto:[EMAIL PROTECTED] > Verzonden: zondag 16 mei 2004 17:47 > Aan: Struts Users Mailing List > Onderwerp: UTF8 and Chinese > > I am trying to use the image tags from Commons sandbox taglibs. I am > trying to use them with Chinese. The Western European languages work fine > with them, but the same thing does not work with Chinese. I am doing the > following, in essence: > > // Welcome in Chinese > String original = new String("\u6b22\u8fce"); > > and > // "Welcome" in Chinese > String original = new String("\u6b22\u8fce"); > byte[] utf8Bytes = original.getBytes("UTF8"); > original = new String(utf8Bytes,"UTF8"); > > Neither works. I just get the proverbial square boxes on the resultant > images. Anyone have any ideas? > > Thanks, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
UTF8 and Chinese
I am trying to use the image tags from Commons sandbox taglibs. I am trying to use them with Chinese. The Western European languages work fine with them, but the same thing does not work with Chinese. I am doing the following, in essence: // Welcome in Chinese String original = new String("\u6b22\u8fce"); and // "Welcome" in Chinese String original = new String("\u6b22\u8fce"); byte[] utf8Bytes = original.getBytes("UTF8"); original = new String(utf8Bytes,"UTF8"); Neither works. I just get the proverbial square boxes on the resultant images. Anyone have any ideas? Thanks, Michael