Create Chinese content
bill18 - June 13, 2006 - 14:10
After I imported the Chinese translation package, the system interface was translated into Chinese. However, when I create chinese content or set the name and the slogan for my site, it either just turned into blank or a string of ?????.
Can anybody help?

Create Chinese content
I checked the default encoding setting. It is UTF-8
What about your
What about your browser?
Anisa.
-----------------------------------------------------------
Kindness builds stronger bonds than necessity.
www.animecards.org - 16,000 card scans and counting!
-----------------------------------------------------------
It may be your database
It may be a problem with the way you created your database? Did you use phpMyAdmin perhaps? The database tables need to have a UTF-8 collation as well. Running database.mysql thru phpMyAdmin will not do this for you!
See http://drupal.org/node/56112
It may be your database
Yes. the collation was set wrongly. The following is the database data exported:
CREATE TABLE `access` (
`aid` tinyint(10) NOT NULL auto_increment,
`mask` varchar(255) collate latin1_general_ci NOT NULL default '',
`type` varchar(255) collate latin1_general_ci NOT NULL default '',
`status` tinyint(2) NOT NULL default '0',
PRIMARY KEY (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;
--
-- Dumping data for table `access`
--
I created the database using Fantastico provide by the hosting company and have the access to phpMyAdmin. What shall I do to fix it?
You can use phpMyAdmin and
You can use phpMyAdmin and set every table in the database to use a collation of "utf8_general_ci", but that may be a lot of work, and I can't find a quick way to do it automatically...
But since you have phpMyAdmin, I suggest you try to install Drupal without Fantastico. It isn't really that hard to do. What control panel does your host offer? If they use cPanel, I can give you directions how to set it up if you like....
I can use cPanel
Yes. I can use cPanel. Please give me the directions. Thanks a lot.
Install using cPanel and phpMyAdmin
My host uses cPanel 10.8.2 with the cPanel X 2.5.0 theme. The phpMyAdmin version is 2.8.0.2 and MySQL is 4.1.19. If your versions are different, it may work a bit different as well...
First, go to the MySQL Databases page in cPanel (so not phpMyAdmin, but the cPanel one). The title of this page is "MySQL Account Maintenance".
1. Create a database. Remember which name you gave it.
2. Create a User with a password. Remember the Username and password.
3. Add the user to your database (with ALL privileges).
Then go to phpMyAdmin. The database you created in the previous steps using the cPanel interface will have the wrong default Collation (my version defaults to latin1_swedish!!), so let's change it:
4. Select your database in phpMyAdmin (using the database list on the left)
5. Go to the "Operations" tab page, and set Collation to "utf8_general_ci".
Then download and install Drupal 4.7.2:
6. Select your database in phpMyAdmin and go to the "Import" tab.
7. Import the file "/database/database.4.1.mysql" (or database.4.0.mysql depending on your version of MySQL). Now you'll have a database with all the Drupal tables installed.
8. Upload Drupal to your preferred location on your webserver.
9. Edit "/sites/default/settings.php" and change your $db_url:
$db_url = 'mysql://username:password@localhost/databasename';
With "username", the name you gave your database User in cPanel (step 2)
With "password", the password you assigned to the user (step 2)
and "databasename", the name you gave your database (step 1)
10. Go to your site, and continue from there...
This should do the trick. Make sure to read the Drupal INSTALL text for additional details. I hop this works for you. If you have any more questions, feel free to ask them.
Hi! I would love to see
Hi! I would love to see some of this info in the handbook.
Question, this is what you would do before you install... but a lot of times the user discovers this after the fact. How would you go back to the database you have already created and change the collations?
Anisa.
-----------------------------------------------------------
Kindness builds stronger bonds than necessity.
www.animecards.org - 18,000 card scans and counting!
-----------------------------------------------------------
When I wrote the above
When I wrote the above installation text, I discovered that Druapl 4.7.2 now has seperate database.mysql files for different mySQL versions (unlike the 4.7 RC's that had one file which was wrongly interpreted by phpMyAdmin). So installing 4.7.2 won't give you any problems with phpMyAdimn, except that the default Collation may be off. This can be changed with phpMyAdmin at any time.
When Drupal is installed with Fantastico the tables and fields within the database may have the wrong collation set. Changing the database default collation won't change the collation of the tables and fields that are already created. So you have to do it manually. You can use phpMyAdmin for that, but it will be a lot of work.
I think if I was faced with this problem, I'd make an SQL dump using phpMyAdmin and then change the text "latin1_general.ci" (or whatever the default value was) into "utf8_general_ci" using an ordinary text editor, remove the database, and then import the SQL back into a new database (Not without a proper backup of course!). There may be smarter ways to do it, but I'm not smart! :-)
Import the file "/database/database.4.1.mysql"
Thanks. It seems on the right track. But I have problem when I try to import:
1. If I had never created a drupal database using Fantastico, can I still have the file "/database/database.4.1.mysql"?
2. I did find the file under the directory where the drupal database was created first time(using Fantastico), and I tried to import the file using the string "/public_html/my_directory/database/database.4.1.mysql". But there was no response from the system.
3. I type the string in the "Location of the text file" in the form of "File to import" . Did I do any wrong?
Maybe just download the file
Maybe just download the file and then import it?
There should be a browse button to select the file on your computer.
Anisa.
-----------------------------------------------------------
Kindness builds stronger bonds than necessity.
www.animecards.org - 18,000 card scans and counting!
-----------------------------------------------------------
Sorry I wasn't clear
Sorry I wasn't clear enough...
Of course you can still have the "database.4.1.mysql" file, even if you never created Drupal using Fantastico. That's because it is part of the Drupal installation package. So when I talk about this file, I assume the version in a downloaded drupal-4.7.2.tar.gz package, not a file that is already on your webserver because Fantastico put it there. So here are extra steps:
1. Download Drupal 4.7.2 from this site.
2. Extract the contents of the Drupal package to your harddisk (not the webserver).
3. in phpMyAdmin, go to the "Import" tab and using the form "File to Import", click on the "Browse..." button and go to the place where you extracted Drupal on your harddisk. There, go to the "database" folder and select "database.4.1.mysql". So the file you want to import is located on your harddisk, not on a webserver.
4. Upload all of the extracted Drupal files from your harddisk to a directory on your webserver.
So there is no need of Fantastico in this whole process. It's just a matter of downloading Drupal from this site.
It's a smart way
I followed your steps and it worked. Thank you very much and this is a smart way of fixing the problem.
But the search function is not working. The cron is running.
same problem
I have the same problem, i installed drupal via cpanel-fantastico. Now that i try to write in japanese i only see ??? -question marks-, is there an easy way to fix this?
when i click preview okay i can see title in japanese, i click submit then ????? -question marks-
I have the same problem too...
Up through preview the Japanese characters show up fine. But after submitting the characters all become ????? question marks.
I installed Drupal at my hosted site via Fantastico. I do *not* have access to the phpAdmin panel that others have mentioned here.
Is there any way to get Japanese characters to work?
They do out-of-the-box in Joomla and WordPress. And with SMF there is an admin option to convert the database to UTF-8, after which Japanese works fine.
But I can't find anything similar in Drupal.
Any suggestions/advice would be appreciated.
Thanks!
doug
I found a PHP loop that
I found a PHP loop that supposedly goes through an entire MySQL database and changes all the collations in all the tables and fields to the needed UTF-8. I modified it to work because the mySql query calls in the original version didn't seem to.
After running the loop it seemed to change MOST of the collations to UTF-8, but not all of them.
However, after running the loop, Japanese input seems to work fine now.
I was just wondering - does anybody have a more rock-solid reliable loop for changing the collations to automate this process?
Thanks,
doug
Hi
Please post the loop you used so that it helps all of us too =)
Thanks!