Ticket #128 (closed defect: fixed)

Opened 10 months ago

Last modified 7 months ago

Installer does not support chinese

Reported by: mikeshi Owned by:
Priority: major Milestone: Undetermined
Component: Habari Core Software Version: SVN
Keywords: Installer, Chinese, has_patch Cc:

Description

When I run the habari first time, it will execute install process. I can input blog title in Chinese, and save it. then, blog's homepage is shown, but the title becomes "?????", every "?" presents a chinese charactor.

And more odd thing is that, when I go to admin page, and reset my "Options", it supports Chinese very well. I can even mix Chinese and Japanese in my title, and it shows very well, too.

I am using SVN version r1315 and db is sqlite, host is DreamHost.

Attachments

installer_charset.diff (0.6 kB) - added by rickc 7 months ago.
Adds content type meta tag to db_setup.php

Change History

Changed 10 months ago by mikeshi

I think that I found why. My website is hosted on DreamHost, and its apache seems setting the default charset but NOT UTF-8. When I install the habari (on the stage of installer), the encoding of browser (firefox) is GB2312, not UTF-8. However, after the install, the home page of habari is encoded by UTF-8. So, the blog title that written in Chinese was saved into sqlite db with GB2312, but when I browse the website (not install stage), the website is encoded in UTF-8, so the title became unrecognized.

And I have fixed it . Just put

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />

into <head> </head> block of /system/installer/db_setup.php to force the page into UTF-8 encoding.

Yeah, very easy, but it works.

Changed 9 months ago by dmondark

  • milestone changed from 0.4 to Undetermined

Moving to a later milestone

Changed 7 months ago by rickc

Adds content type meta tag to db_setup.php

Changed 7 months ago by rickc

  • keywords Chinese, has_patch added; Chinese removed

Changed 7 months ago by skippy

  • status changed from new to closed
  • resolution set to fixed

Fixed in r1625. Thanks mikeshi and rickc!

Note: See TracTickets for help on using tickets.