Tk Source Code

View Ticket
Login
Ticket UUID: 477949
Title: option readfile cannot use multibytes
Type: Bug Version: obsolete: 8.4a1
Submitter: ikeda1t Created on: 2001-11-04 07:13:57
Subsystem: 57. [option] Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2016-02-03 08:48:20
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2016-02-03 08:48:20
Description:
since 'option readfile' doesn't convert encodings
of the target resource file,
multibyte characters in such resource files
(mainly for Japanese TrueType font name on MS-win32)
are not interpretted correctly.

on MS-Win32 environment, I wrote a resource file:

*Label*Font: {Times New Roman} 40 normal

goes well, but when I use Japanese TrueType font
names replacing above 'Times New Roman',
the font is not loaded, and the output of
[.label cget -font] is in some binary(unreadable)
characters.
User Comments: jan.nijtmans added on 2016-02-03 08:48:20:

Removed from Tk8.5, will not be part of Tk8.5.19. Discussed on Tcl Core Mailing List.

For Tk 8.6, a follow-up ticket is here: [0a3d799a6d]

So, keeping this one closed.


jan.nijtmans added on 2015-10-25 22:33:52:
Fixed in core-8-5-branch and trunk

jan.nijtmans added on 2015-10-14 08:02:28:

It appears that androwish has a (partial) fix for this: http://core.tcl.tk/tk/fdiff?v1=f690cf23ca69383f&v2=184431aa1ee74f29&sbs=1


dkf added on 2001-11-06 20:48:35:
Logged In: YES 
user_id=79902

It seems that the following functions in generic/tkOption.c
are (probably) not i18n-aware:
   AddFromString
   GetDefaultOptions
   ReadOptionFile

There may be other problems through the option code too.  I
must admit that I'm not experienced enough with it to say
for sure.

A possible work-around would be to build an option-file
parser in Tcl and use that (plus [option add]) instead of
the C version...

ikeda1t added on 2001-11-06 20:01:11:
Logged In: YES 
user_id=367034

Platform is MS-Windows98 Second Edition. And some
people in Japan also reported so, they use Win98, NT4.0,
 and Win2K.
The two very popular Japanese TT-font names are
"£Í£Ó¡¡¥´¥·¥Ã¥¯"(MS-Gothic) and "£Í£Ó¡¡ÌÀÄ«"(MS-Mincho).
As well as them, almost all of Japanese TT Font names
on Win32 (and their *.ttf file names) are named
using Japanese multibyte characters.

hobbs added on 2001-11-06 08:01:13:
Logged In: YES 
user_id=72656

What is the Japanese TT font name being referred to?  Which 
Win32 platform (Win2K with IME, or ??).

dkf added on 2001-11-05 17:22:22:
Logged In: YES 
user_id=79902

Hmm.  What should be the encoding of an option file anyway?
I don't recall seeing that defined anywhere, but it is quite
possible that it is instead *helpfully* defined (by the X
consortium) to be ISO8859-1...  :^(