Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Chinese display
Guo Yangguang
8/12/2007 4:32:00 PM
hello:
I have built a project with Instant Rails.Now only a database and a
scaffold based on a product model have finished.But when i inputted
"../admin/list" in my browser,i found my chinese characters cound not
display normally.Then i made five steps:
1 ajusting encoding in my browser menu
2 in "C:\InstantRails\conf_files\my.ini"directory,making sure
"my.ini" file containg "[mysqld] default-character-set=utf8
[client] default-character-set=utf8" setting.
3 adding "encoding: utf8" in my "config/database.yml" file
4 making all the ".rtml"and".rb" files saved in "utf8" way
5 deleting my database and rebuilding the database
When i made my "three" migration using "rake db:migrate",an error
displayed in my console window saying "001_create_products.rb:14:syntax
error, unexpected kEND,expecting $end".
How do i manage this problem?
More important,i want to know how can i make my app to display
chinese correctly.
thank you!
--
Posted via
http://www.ruby-...
.
2 Answers
John Joyce
8/13/2007 8:22:00 AM
0
On Aug 12, 2007, at 11:41 AM, Logan Capaldo wrote:
> On 8/12/07, Guo Yangguang <gyg22@163.com> wrote:
>>
>> When i made my "three" migration using "rake db:migrate",an error
>> displayed in my console window saying "001_create_products.rb:
>> 14:syntax
>> error, unexpected kEND,expecting $end".
>> How do i manage this problem?
>> More important,i want to know how can i make my app to display
>> chinese correctly.
>> thank you!
>
>
> Well as far as proper display of chinese, can't help you there,
> although you
> may also want to consider that you need to be sending the correct
> character
> encoding at the http level as well (either with a header or meta
> tag). But
> that error just means you have an extra "end" at the end of
> that file
> 001_create_products.rb. Try deleting it.
>
> --
>> Posted via
http://www.ruby-...
.
>>
>>
For language display, encoding is the first obvious part, but the
font being used must also support the characters in the code ranges
of the encoding. OP is using rails which is all defaulted to UTF8 so
encoding is not the problem there.
Likely, it is the fonts, however you should also make sure your
editor is also set to UTF8 for your text files.
Yoorghis
1/25/2011 11:54:00 PM
0
On Tue, 25 Jan 2011 18:41:05 -0500, Steve <stevencanyon@yahooooo.com>
wrote:
>You're just a lot of fun Milt... you react in such an entertaining
>way...
Like when Travesky beats you?
SNICKER.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Chinese display
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password