Use UTF8 in the framework

Hello,

First, thank you guys for this framework and congratulations for the great work.

So, my request: Encode the framework files and the generated ones in UTF8, please. Yii already supports i18n, but using ASCII this support is not complete, because special chars have to be encoded, escaped, and it’s a pain in the ass. ;D [I'm brazilian, and we use a lot of 'ã', 'ç' and 'é' here =)]

I have not hacked the core yet [hope I have time do to it soon] but I think it's not a very complex task, and surely it's a very useful and valuable one.

Best,

Elomar França

Yii files ARE in UTF8. Which file did you find that has the problem?

Oh, sorry. In my machine, every file is encoded as ASCII. The ones under /framework, the ones generated by the crud, everything. I had to manually convert then in order to get my special chars working. The problem should be in the download. =(

Sorry for bothering. I will download again and investigate why this happened.

Thanks for helping.

I think this is probably related with your editor's setting. Maybe it's opening a file by default in ASCII? Anyway, other than those i18n data and translated files, the core source files do not really have encoding problem because there are no non-English characters.

My editor is configured to UTF8.

I download the .zip, .tgz versions from the site and from sourceforge, unzipped using different programs but everything is ASCII. I'm stuck in windows, this may be the problem

The biggest problem I'm having is with the generated views. Because they are ASCII encoded, the browser doesn't render correctly the special chars that came from the database.

I'll try downloading it on Ubuntu when I get at home, it may solve the problem.

It does not matter where or with which operating system you download Yii.

If there are no special characters in a file then there is no difference between ascii and utf8. You just have to make sure that you editor safes as utf8 when there are special characters.