On Fri, Jan 22, 2010 at 1:16 PM, Terry Brown <[email protected]> wrote:

>> On Fri, Jan 22, 2010 at 11:40 AM, Terry Brown <[email protected]> 
>> wrote:
>> > In the (hopefully) attached testu.zip is a file called rhythmbox.desktop.  
>> > I open it in Leo, it comes in as an @edit node with @killcolor and seems 
>> > ok.

Time now to resolve this issue.

What platform are you on?  What does the orange encoding line say?  Mines says:
default encoding cp1252 from locale

> You mean you can delete all the X-GNOME-FullName lines and the text before 
> and after meet up as they should?

Yes.

> What do you mean by "byte hash", \u043d or བོཀསི་སྙན?

The latter.

> '\u043d' in the body would suggest repr() has been involved somewhere, I 
> think.

Correct.  That can not be the problem.

>> What is the encoding for the file?
>
> I would imagine it's supposed to be UTF-8, and
>
> u = unicode(file("rhythmbox.desktop").read(), 'utf-8')
>
> works, whereas 'utf-16' or 'ascii' fails.

I opened the file with scite.  Selecting the utf-8 encoding produces
what looks to be reasonable lines in several different languages.
Examples:

Korean:  X-GNOME-FullName[ko]=리듬박스 음악 연주기
Arabic: X-GNOME-FullName[ps]=رېدمبکس ټنګټکور غږونکی
Thai: X-GNOME-FullName[as]=Rhythmbox সঙ্গীত প্লেয়াৰ
Chinese: X-GNOME-FullName[zh_TW]=Rhythmbox 音樂管理程式
Japanese: X-GNOME-FullName[ja]=Rhythmbox ミュージック・プレイヤー

I suspect the problem is with the read of @edit files.  In general,
Leo, like scite, must be told the correct encoding: it's not possible,
in general, to guess the correct encoding of an encoded string without
doing AI.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to