How to customise en_utf8

This forum post has been removed

Number of replies: 6
The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: How to customise en_utf8

by Tim Allen -
Hi Dave,

After making your customized en_utf language pack you need to set it to the site default or your personal default in your profile in order to see the new strings.  Did you remember to do that?

Tim. smile
In reply to Deleted user

Re: How to customise en_utf8

by N Hansen -
I thought it was supposed to be called en_local_utf8. I agree with you though, the documentation about handling languages, especially when you have already existing custom language packs from 1.5, is still not sufficient. I was able to covert my database successfully, but unable to get the unicode stuff that had displayed nicely in 1.5 to display at all in 1.6 except as a bunch of question marks. So I returned to the non-unicode version of my database. It's a bit ironic that I can get unicode characters to display better when my database is not in unicode! I'm waiting until the documentation makes more sense with regards to step by step how to switch languages from 1.5 to 1.6 to try again.
In reply to N Hansen

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to N Hansen

Re: How to customise en_utf8

by Tim Allen -
Hi N,

If your 1.5 site is displaying the unicode characters successfully, that means that the language pack you are using there is set to display the pages in unicode by default, otherwise it would not work.

In other words, some of your database text is stored in unicode and is being displayed as such in 1.5, even though the database table is showing non-unicode latin_swedish_ci as the default encoding.

After the conversion process when upgrading to 1.6, the tables should show utf8_general_ci as the default encoding.  But the problem seems to be that unicode text is being corrupted in the upgrade process.  It should be left alone as it is already in unicode, but perhaps it is being incorrectly read as non-unicode and converted, which is leading to the corrupted text.

If the 1.5 language pack is set to a non-unicode encoding like iso-8859-1, then the unicode text wouldn't have been displaying properly (apart from English unicode of course), and it should be converted successfully.  On the other hand, if the 1.5 language pack is set to unicode, then the unicode text would display correctly - but in this situation I have a feeling that it is not being converted properly in the upgrade to 1.6.

I am just trying to work all this out, hope we can get to the bottom of it!  thoughtful

Tim.
In reply to Tim Allen

Re: How to customise en_utf8

by N Hansen -
I went in the database to look at the text after the conversion, and at least what I saw there was in Unicode. But what was getting outputted in Moodle was question marks in place of Unicode characters. I'm a bit lost on the language packs and where they should go and what they should contain and how they should related to one another in 1.6 so there might be an issue with a language pack, but I don't know. I've read all the existing instructions but what I really would like to see is some explicit instructions about how to convert existing custom packs for 1.5 to 1.6 step-by-step.


I'd be happy to send someone a few tables from my database to play around with to see if they can figure out the unicode problem.

In any case, this issue is on the back burner for me right now-the big issue for me now is the essay question comments from 1.5 disappearing! I'm just waiting for my host to restore a copy of my old database for me so that I can see if I can manually restore them to the 1.6 database.

In reply to N Hansen

Re: How to customise en_utf8

by N Hansen -
OK. By chance, I got some more information about what might be happening when I was fixing my essay question problem. To cut a long story short, I exported a table from my Moodle 1.5 database that contained some unicode characters and then reimported it into my Moodle 1.6 database using the import and export functions of PHPMyAdmin. The particular field with the unicode data was let to the Latin1_Swedish or whatever it is called. However, in the process of exporting (or was it importing), it gave me a choice of encoding, but not as specific as Swedish, so I just chose Latin1. When I went to look at a Unicode character on my Moodle site that should look like this (note you will only see this character properly in Firefox):



I instead saw a string of gibberish.

So I went into the database and found the following:

ḫ

So I tried changing this to an actual ḫ.

When I went back to look at it in Moodle, the ḫ had been replaced by ?.

Now I figured something had gone wrong in the import and so I went back to the original table, and found it had:

ḫ

Which is shown in Moodle as:



Now, the vague idea I get from this is that either ḫ is being converted to ḫ correctly during the unicode conversion but Moodle doesn't know how to handle printing that out as ḫ for some reason, and/or it is converting ḫ to ḫ, which it shouldn't be doing.