22 марта 2009 г. 1:45 пользователь Yarko Tymciurak <[email protected]> написал:
> 2009/3/21 Alexei Vinidiktov <[email protected]>
>>
>> The thing is the project that I'm intending to use web2py for is a web
>> application for language learners, and I need to be sure that as many
>> languages as possible are correctly treated by the application.
>>
>> So, I don't think it would be safe to use a Russian character for
>> calculating the length of a field as in charlen = lambda n:
>> n*len('л').
>
> From the link I sent
> ( http://en.wikipedia.org/wiki/UTF-8#Rationale_behind_UTF-8.27s_design,)
> 3 bytes covers "the basic multilingual plane" which covers all characters in
> common use.  four bytes are needed for characters.... which are rarely used
> in practice."
> I think you can probably start w/ 3 byte assumption, most times that will be
> more than you need, so statistically, the rarely used characters either will
> not come into play at all, or will fit regardless.   You can collect data
> (my guess is *3 will be too much anyway).
> Looking forward to hearing more about this interesting project!

Thanks for your input, Yarko. I've read the articles you mentioned and
I understand UTF8 better now. You are right about the 3 byte
assumption. It's a pretty safe bet for my purposes.

I hope the project I'm working on will be shaping up in the coming
months, and that I'll have enough news to share about the progress.

Anyway, as I'm only beginning to work with web2py, I'm going to have
quite a few questions to ask.

[...]



-- 
Alexei Vinidiktov

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to