[aida] convertToSloveneChars. Bug?

Janko Mivšek janko.mivsek at eranova.si
Tue Feb 19 13:14:08 CET 2008


Hi Jim,

Please try this patch, maybe it will help:

String>>convertToSloveneChars
    "convert csz string with ^ as 'sumnik' to proper unicode string.
    Only pure ASCII strings are converted!"
    "'Mivs^ek' convertToSloveneChars"
    | in out ch |
    self class == ByteString ifFalse: [^self].
    in := self readStream. out := WriteStream on: String new.
    [in atEnd] whileFalse:
     ...

As you can see only pure ASCII strings are trying to be converted, so 
that Chinese strings won't be counted, because are TwoByteStrings already.

 > However, AIDA/Web is just wonderful and unbelievable.

Well, who doesn't like to hear such a praise :) I'm specially proud that 
  Aida works for a whole world already, without much problems. And those 
problems are easy solvable. For instance, just recently we 
added/finished international Url support to Aida, see

AIDA URL resolution patch by Masashi
http://www.nabble.com/AIDA-URL-resolution-patch-td14798115.html#a14800982


Janko


Jim Guo wrote:
> Hi, Janko,
> 
> 2008/2/18, Janko Mivšek <janko.mivsek na eranova.si 
> <mailto:janko.mivsek na eranova.si>>:
> 
>     Ni hao Jim,
> 
> 
>     Method #convertToSloveneChars is implemented as extension of String (see
>     Aida-Extensions) and therefore it must work. See if the method is there
>     and that it works.
> 
>     ....
>     For my language it is simple, we have only 3 non-ASCII letters: č š and
>     ž. I put text elsewhere in code simply as c^ s^ z^, then above mentioned
>     method convert this in to a real Unicode string.
> 
>     [....]
> 
> 
> Thanks. I see.
> Chinese Chars would use two bytes,and when they are mixed with single 
> byte letters or something, then in an eye of ASCII, some funny chars 
> occur. VW class printString use to have a point separating the namespace 
> part and class name part. This point, makes the mess. So codes see a $^ 
> char which is not. And the miss read string causes a 
> convertToSloveneChars but, of course, fails.
> Haven't found other cases of the same trouble. I'm just starting. I 
> don't know much about Encoding. Too complicated for me. But I do loaded 
> VW Unicode supporting packages.
> By the way, a url in Chinese cause exception, a viewChineseChars or an 
> actionChineseChars doesn't work.
> However, AIDA/Web is just wonderful and unbelievable.
> 
> P.S.
> Janko, you might want to mention in the tutorial, that, to setup a new 
> site accessible from Internet, before doing:
> (AIDASite named: 'aNewSite')
>                 host: 'some.domain'
>                     ip: '*'
>                     port: 80
> one should make sure that there is not another site already exists using 
> ip '*' . If there is, an exception will occur. I removed in inspector 
> the demo site when debugging but I don't know what to do if there are 
> multi-sites on one machine.
> 
> 
> Best Regards,
> 
> Jim G
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Aida mailing list
> Aida na aidaweb.si
> http://lists.aidaweb.si/mailman/listinfo/aida

-- 
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si


More information about the Aida mailing list