[Typo3-dev] typo3 and japanese

soar ya-net at 21cn.com
Sat Jul 10 06:35:53 CEST 2004


    actually,you need not to pay attention to how browse to make a soft linebreak in the text,because it has been well done by browse if your charset in HTML is set right,and your system supports display asian character.

    it is sure that there are no spaces between the glyphs,this is why the indexed_search could not work well when the charset is asian character. browse will dectect the border,if the space could not contain a glyphs,it will give a soft linebreak before it. it is a little like when we writing english,if we find we can't complete a word in one line,we can add a "-" and complete it in next line,like this:

XXXXX XXXXX XXXXXXXXXXXXXX XXXXXXXXXXXXXX a uncomp-
lete word.

    you need not pay attention whether these glyphs is a set,just split it.but pay attention do not split one glyph.
    
    and there is a good script to replace the split function in php,it can split chinese,and well done if it contains english word.

----------------------------------------   //by xuefer

    function strleft($str, $len) {
    $h = false;
    $l = strlen($str);
    if ($len > $l) { return $str; }
    if (!$l) { return ''; }
    while ($len <= 0) { $len += $l; }
    for($i=$len-1; $i>0,$str[$i]>="160"; $i--) { $h = !$h; }
    if ($h) $len--;
    return substr($str,0,$len);
    }

-----------------------------------------

    I wish you can modify it and replace the originally function in typo3 because it could not work well when there are asian charactor in string.

	

======= 2004-07-03 07:18:31=======

>I just spend a few days in Paris working on Japanese localization of a
>website...
>
>What I came back with is this:
>
>utf-8 is OK for storage of information (very good and very important).
>shift-jis is preferred for display of information in the frontend (will
>be possible also, although it requires conversion forth/back which is
>error-prone).
>Graphics generation can easily be done if you have a japanese font.
>
>The biggest surprise to me was when they presented me with the fact that
>in japanese, korean and chinese text there are no spaces between the
>glyphs. So, how can the browse make a soft linebreak in the text? Well,
>by just breaking in any glyph sequense you like of course. But that is a
>problem, because words in these languages typically consist of a set of
>these glyphs and in order to break the line softly at the right spot you
>need to break *between* the glyphs that make up a word! Now, that is not
>a problem if you understand japanese text of course, but a computer
>doesn't and since there are no space characters between words like in
>western text there is no token by which browsers can divide words...
>
>Hmm, it was all very confusing and partly shocking to me... :-)
>
>- kasper
>
>-- 
>TYPO3 - everything artcoded
>
>
>_______________________________________________
>Typo3-dev mailing list
>Typo3-dev at lists.netfielders.de
>http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
>

= = = = = = = = = = = = = = = = = = = =
			


                    致
礼!

				 
        soar
        ya-net at 21cn.com
          2004-07-10



More information about the TYPO3-dev mailing list