Is Django the way to go for a newbie?
Dwight at GoldWinde.com
Tue Aug 11 03:53:14 CEST 2015
So many new things to look into!
Chris, I now will also investigate i18n.
www.3forliving.key.to (video playlist on YouTube)
www.couragebooks.key.to (all my books on Amazon)
On 8/10/15, 9:27 AM, "Chris Angelico" <rosuav at gmail.com> wrote:
>On Mon, Aug 10, 2015 at 3:41 AM, Michael Torrie <torriem at gmail.com> wrote:
>> Web development is very a very hard problem, largely because it involves
>> quite a few different domain-specific languages that you have to be
>> proficient in...
>> In this area, node.js is getting very popular. I don't care much for
>> reduced the number of languages you have to know by one.
>There's another thing you absolutely have to know when you do web
>development, and that's i18n. This is why I don't recommend Node.js
>for server-side work - because Python's Unicode support is better than
>JS's. Stick with Python (and avoid Python 2 on Windows) and you get
>get UTF-16 as the official representation. What's the length of the
>string "Hello, world"?
>>>> len("Hello, world")
>> "Hello, world".length
>So far, so good. What if those weren't ASCII characters?
>>>> len("🄷🄴🄻🄻🄾, 🅆🄾🅁🄻🄳")
>(That's Python 3. In Python 2, you'd need to put a u"" prefix on the
>string, but it's otherwise the same, modulo the Windows narrow-build
>> "🄷🄴🄻🄻🄾, 🅆🄾🅁🄻🄳".length
>ECMAScript stipulates that strings are not codepoints, but UTF-16 code
>units, so whenever you work with astral characters (which includes a
>lot of emoticons, Chinese characters, and other symbols that your end
>users *will* use), they'll get things wrong. The length of the string
>counts astral characters twice; indexing/slicing can take half of a
>character; any manipulation at all could corrupt your data.
>So, use Python for all your text processing. Life's better that way.
More information about the Python-list