bugSamizdat - Bugs: bug #20882, i18n bug (e.g. ja) - latin letters...

 
 

bug #20882: i18n bug (e.g. ja) - latin letters shown as double width font in at least one case

Submitted by:  Boud Roukema <boud>
Submitted on:  Thu 23 Aug 2007 11:28:45 PM UTC  
 
Category: NoneSeverity: 2 - Minor
Status: Wont FixPrivacy: Public
Assigned to: NoneOpen/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 25 Feb 2008 04:33:13 PM UTC, comment #2:

i think it's correct that this is a browser/font/operating-system usability and/or ease-of-installation bug:

  • zh_CN is also a double width font, but in the situation (browser, samizdat installation) where ja has the double width font latin letters, zh_CN does not cause the same problem
  • iceweasel (a.k.a. firefox) 2.0.0.12 from debian-etch does not have the problem, neither with zh_CN nor with ja.

i'm happy to close this bug.

Boud Roukema <boud>
Project Member
Sat 23 Feb 2008 12:59:01 AM UTC, comment #1:

This is a browser bug, I don't see how it is relevant to Samizdat.

Dmitry Borodaenko <angdraug>
Project Administrator
Thu 23 Aug 2007 11:28:45 PM UTC, original submission:

PROBLEM:
CJK (chinese/japanese/korean) characters are frequently
shown on a screen as a "double width" font. Latin text mixed in with
CJK text - e.g. a samizdat page in which not all the articles have been
translated into Japanese - is best shown as a single width font.

However, the CJK codings as well as (usually) the CJK fonts (AFAIK)
have their own additional copy of latin letters - after all, just 52
letters and a few punctuation characters is almost nothing compared to
a few thousand kanji. This additional copy in the font is presented as
a double width font. And these latin letters look ugly. Text in this
looks like there's an extra space between every letter and it's rather
difficult to read. T r y r e a d i n g t h i s a n d s e e i f
y o u l i k e i t .

On my browser (firefox 1.0.4-2sarge17), the japanese appears as a
double width font and the other text also shows up as a double width font,
whereas the other text should appear as a single width font - as it
did in earlier versions of samizdat - i'm not quite sure how long ago.

konqueror-3.3.2 does not have this problem

If this is only a problem for me, then it's not a serious problem, but
if it occurs for a large number of users, then it is a serious problem.

POSSIBLE SOLUTIONS:

(1) BAD solution: remove xml attribute of <html> tag

This bad solution probably shows something about the problem:

templates/page_layout.rhtml has the line:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= Locale.get %>" lang="<%= Locale.get %>">

which looks like

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">

in the html code of a rendered page.

Remove

xml:lang="ja" lang="ja"

and the problem is solved.

(2) possibly acceptable solution:

Here is one solution based on the recommendations in:

http://www.w3.org/International/questions/qa-css-lang.en.php

This works for me (without removing 'xml:lang="ja" lang="ja"').

An argument against this solution is that having to define a
particular font family for a particular seems a bit too hardwired. It
would also mean that similar lines would have to be added for every CJK
language variant.

(3) not as good as (2), but required to satisfy the non-standard browser "IE"

The same w3.org page says that solution (2) won't work for internet exploder:
http://www.w3.org/International/questions/qa-css-lang.en.php

So a solution that should work here is to use a css class instead of
the xml language feature. This requires a small hack to page_layout.html

giving:

<html xmlns="http://www.w3.org/1999/xhtml" class="ja" xml:lang="ja" lang="ja">

DISCUSSION:

This last solution (3) seems rather ugly to me and that's what the w3.org
people seem to argue as well. However, we don't want to exclude
disadvantaged people (those using IE) when an easy hack can satisfy
them. Maybe we should have a global variable @@ie_hacks so that people
willing to ignore the problems of IE users can set @@ie_hacks = false ...?

However, even (2) seems to me a bit too hardwired. On the other hand,
it should not interfere with non-CJK scripts and it should be easy to
reverse if a better solution comes along later.

A relevant email i found was here, but it's from back in 2000:
http://mail.nl.linux.org/linux-utf8/2000-02/msg00033.html

i haven't found anything obvious and more recent.

i'm setting this as "minor" - we'll possibly see soon based on users'
reactions whether this is an important bug or not. At least we'll have
this hack solution ready in case nothing better comes along quickly.

Boud Roukema <boud>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by angdraug (Posted a comment)
  • -unavailable- added by boud (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 25 Feb 2008 04:33:13 PM UTCboudOpen/ClosedOpen=>Closed
    Sat 23 Feb 2008 12:59:01 AM UTCangdraugStatusWorks For Me=>Wont Fix
    Fri 24 Aug 2007 12:49:20 AM UTCboudStatusNone=>Works For Me

    Back to the top


    Powered by Savane 3.1-cleanup1