|
From: Ethan M. <merritt@u.washington.edu> - 2011-11-02 00:59:13
|
On Tuesday, November 01, 2011 05:25:41 pm Shigeharu TAKENO wrote: > shige 11/02 2011 > ---------------- > > Recently, variable degree_sign with encoding is introduced. But, > I think it has a problem for Japanese environment. > > There are 3 encoding systems we use normaly in Japan, Shift_JIS > for most of MS-Win user, EUC-JP for many unix user, and UTF-8. > > Current version of gnuplot has support for Shift_JIS encoding > because the Shift_JIS Japanese characters have a singular > feature that the 2nd byte of them may be 7bit code (0x40-0x7E). According to the code table on Wikipedia, the SJIS code for degree sign is not the same as any of the other encodings. There is a comment in the new code that gives the SJIS code, but right now it returns an empty string. However, for SJIS it works anyway in the gd and cairo terminals because iconv() is used on output. > We have not need care of EUC encoding in gnuplot because all > bytes of EUC-JP Japanese characters are 8bit code (0x8E,0x8F, > and 0xA1-0xFE). > > However, newly introduced degree_sign has a default value of > 8bit code 0260 (0xB0), which is a proper code of iso-8859-1 > encoding, but is not recognized in EUC-JP encoding. Right now the degree sign is not being used anywhere, so it cannot be a problem yet. The intention is to use the degree sign to create a default format for writing geographic coordinates (patch #3428074 on SourceForge). Even so, this would only be a default format. You could still specify a different format if it is needed. > To solve the problem, make the new encoding support for > EUC-JP, or to set the default value of degree_sign to 7bit > character strings, I think. If you tell me the correct character sequence for EUC-JP I can at least put it in a comment, as it is now for SJIS and CP950. Or the program could use iconv() to convert the symbol into the locale setting of the program environment. Ethan -- Ethan A Merritt Biomolecular Structure Center, K-428 Health Sciences Bldg University of Washington, Seattle 98195-7742 |