Fossil

View Ticket
Login
Ticket UUID: 6b498a792c0f9ca02b5b2c11f7ca9a6a2c01a0b1
Title: Cyrillic symbols does not display correctly
Status: Fixed Type: Code_Defect
Severity: Severe Priority: Medium
Subsystem: Resolution: Fixed
Last Modified: 2010-02-16 20:03:28
Version Found In: c4c231069e
Description:
In Wiki page and other pages, if web-server started by fossil ui reponame Encoding in browser UTF-8

ron added on 2010-02-03 12:17:56:
Can you please post an example of UTF8 Cyrillic text which doesn't appear correctly?

Are you sure the font you are using for the web page supports the characters you want to display?


anonymous added on 2010-02-03 13:49:25:
Example of cyrillic text: Пример печати примечаний


anonymous added on 2010-02-03 13:51:58:
Example2 of cyrillic text: Пример печати комментария


anonymous added on 2010-02-03 13:54:10:
I can't reproduce this problem :(


ron added on 2010-02-03 14:00:57:
Nor can I. Maybe it was a font problem.


anonymous added on 2010-02-03 14:01:22:
Possible workaround: In Windows, before start fossil ui reponame from cmd.exe, set encoding in cmd.exe to UTF-8 by chcp 65001


anonymous added on 2010-02-04 06:01:18:
In my repository I can reproduce this. When create new ticket, in title field the symbol 'й' may bу print incorrectly. Same problem in comment field for ticket. And chcp 65001 not fix the problem.


ron added on 2010-02-04 06:09:06:
It works fine for me, using [49cffc0187]. I can only assume you don't have the browser set to use UTF8 or something. I can create a page with that name, and I can show content with that name.


anonymous added on 2010-02-04 06:37:25:
Problem present in WindowsXP only.

Steps for reproduce the problem:

In Windows, start cmd.exe In cmd.exe console: fossil new test fossil ui test

In browser select Tickets > New Ticket and in field 'Enter a one-line summary of the problem:' type cyrillic text with symbol 'й', for example type 'Это комментарий'. Also type text 'Это комментарий' in detailed description field. Click 'Submit' button. And in View Ticket form loock at corrupted text for Title field and Description & Comments field.


anonymous added on 2010-02-04 06:43:37:
And reproduced in Firefox, IE and Chrome


ron added on 2010-02-04 06:55:05:
Can you please try this version: http://ronware.org/fossil.zip

I do not have Windows, but it runs correctly under Wine on Linux ... not that that means anything, but please give it a try.


anonymous added on 2010-02-04 07:50:02:
I try the version from http://ronware.org/fossil.zip and it have the same defect

I can send you screenshot with example of corrupted text.


ron added on 2010-02-04 09:10:57:
Try that fossil.zip again -- I updated it with a small fix. Also, please email me (ron @ ronware.org) the images of the corrupted text.


anonymous added on 2010-02-04 09:31:17:
Screenshot emailed, updated version has the defect too.


ron added on 2010-02-04 13:37:25:
Can repro now, on XP (in a VirtualBox).


ron added on 2010-02-04 14:55:03:
I think I understand the problem to some extent.

The final character is 0x0439, and the last byte is 0x39, which is the same as the single-quote character. I don't know where, but my guess is that some cleaning code is stripping out that quote.

What I don't understand is why it should fail on Windows but not on Linux. I did confirm that XP can take the troublesome string and convert it to UCS2 and back to UTF8 without any loss, so that isn't the problem.


ron added on 2010-02-15 20:29:15:
The routine 'fossilize' seems to be causing grief:

fossilize:
[Это комментарий]
after fossilization:
[╨¡\╤é╨\╛\s╨║╨\╛╨╝╨╝╨\╡╨\╜\╤é╨░\╤Ç╨\╕╨]

removing backslashes:
[╨¡╤é╨╛s╨║╨╛╨╝╨╝╨╡╨╜╤é╨░╤Ç╨╕╨]

The last character is getting munged. I am guessing that fossilize and unfossilize should be made UTF8 aware...


ron added on 2010-02-16 10:08:30:
Interesting: this bug ONLY happens on XP. I tried Vista and Windows 7, and on both it is ok.

I wonder if it is actually a problem in IE 6? I'll try Firefox on XP to see if that fixes the problem.


ron added on 2010-02-16 10:56:14:
No, Firefox has the same problem (as the OP noted above). So... what's the difference between XP and later Windows?


ron added on 2010-02-16 20:03:28:
checkin [0e2281fc8a]