Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-08-06 11:21:00

stomv
New Member
Registered: 2007-08-06
Posts: 1

[textile] Diacritics, Pinyin, and a *nix text editor

Good folks:

I’ve searched for answers, but to no avail. I hope you can point me in the right direction.

I have a website, in English, with only English [American] readers, though not all in America presently. I know this for sure because it’s behind a userid/passwd prompt and I personally know each person. My content is in English, except that I occasionally wish to write in Pinyin, which is the Roman character representation of Chinese. In Pinyin the grave, acute, circumflex, and macron/long diatrics are essential.

Now, here’s the caveat: I’m using a *nix environment’s flat text editor to do this. I’d like to implement those four accents, but only write in ASCII characters.

Is there a way for textile to convert ASCII punctuation-character combinations to HTML diatric characters? Since I’ve incorporated textile into a perl script, I could roll my own, but I’d rather not… I’d rather just feed each line to textile and get the HTML automagically. Thanks!

Offline

#2 2007-08-18 14:25:34

chinesedream
Member
Registered: 2006-09-05
Posts: 22

Re: [textile] Diacritics, Pinyin, and a *nix text editor

Yes you can do this with Unicode encoding (providing textile doesn’t mess up your code – textpattern developers may confirm this), to do so yoursite must set to UTF-8 charset – this seems obvious however I do see people have the charset sets to gb2312 with a utf-8 able cms.

This tool comes very handy:
http://www.foolsworkshop.com/ptou/index.html

Offline

Board footer

Powered by FluxBB