Hi all, Here at chintha.com, we have a not-so-common situation. At www.chintha.com we are using drupal for hosting a multi-language site. We have malayalam unicode and english content in the nodes and comments.
Recently there is a change in the malayalam unicode character encodings. So 6 characters have new codes assigned to them by unicode organization. The new fonts for malayalam will be using the new encodings. If one user is using a new font, they will not be able to see the 6 letters, which have new encodings now. Eventually everyone is supposed to use the new encoding.
The requirement now is to convert the characters with old encoding to the new encoding. How do i do a search for the old characters and replace with the new characters in all nodes and comments? Is it possible to do this in the database directly?
Any comments/ideas/code snippets are greatly appreciated.
thanks, Paul
On Tue, 28 Jun 2005 paul@chintha.com wrote:
Recently there is a change in the malayalam unicode character encodings.
Didnt think that could happen.
The requirement now is to convert the characters with old encoding to the new encoding. How do i do a search for the old characters and replace with the new characters in all nodes and comments? Is it possible to do this in the database directly?
Any comments/ideas/code snippets are greatly appreciated.
This should be possible. When Drupal migrated to utf-8 for everything, I did a sql dump and let recode convert the dump from latin1 to utf-8. Worked flawlessly. So you should find yourself a version of recode or iconv that supports this conversion for the chane at hand. Or do search and replace on the sql dump.
Always keep a backup of your database.
Cheers, Gerhard
Hi Gerhard, Yes, it is a rare event... but it happens as the indian languages in unicode are still undergoing some changes...
I didn't fully follow your solution. How do i run a search and replace in sql dump? Is it possible to open it in vi and do a search and replace?
running recode/iconv: Is this done at the command line?
thanks for your quick response...
thanks, Paul
Gerhard Killesreiter wrote:
On Tue, 28 Jun 2005 paul@chintha.com wrote:
Recently there is a change in the malayalam unicode character encodings.
Didnt think that could happen.
The requirement now is to convert the characters with old encoding to the> new encoding. How do i do a search for the old characters and replace> with the new characters in all nodes and comments? Is it possible to do> this in the database directly?>> Any comments/ideas/code snippets are greatly appreciated.
This should be possible. When Drupal migrated to utf-8 for everything, Idid a sql dump and let recode convert the dump from latin1 to utf-8.Worked flawlessly.So you should find yourself a version of recode or iconv that supportsthis conversion for the chane at hand. Or do search and replace on thesql dump. Always keep a backup of your database. Cheers, Gerhard -- [ Drupal support list | http://lists.drupal.org/ ]
On Fri, 1 Jul 2005, Paul wrote:
Hi Paul!
Yes, it is a rare event... but it happens as the indian languages in unicode are still undergoing some changes...
I didn't fully follow your solution. How do i run a search and replace in sql dump? Is it possible to open it in vi and do a search and replace?
Sure, you can do that.
running recode/iconv: Is this done at the command line?
Yes.
But you need a version of recode or iconv that knows about both encodings. Not sure that exists.
Cheers, Gerhard
Paul wrote:
Hi Gerhard, Yes, it is a rare event... but it happens as the indian languages in unicode are still undergoing some changes...
I didn't fully follow your solution. How do i run a search and replace in sql dump? Is it possible to open it in vi and do a search and replace?
This is probably easiest. Perhaps someone has made a simple conversion tool already for these particular changes. In that case, just do a mysqldump, convert the .mysql file, and import it into a fresh database. Make sure to take a backup of the unmodified dump in case anything goes wrong ;).
Steven Wittens
Dear all, I did an upgrade yesterday and along with it upgraded weblinks too. But i am seeing a difference between my local test setup and online version. In the local weblinks directory, i lost the directory structure. This i can understand as there is a change in weblinks module design. But in my local setup i can still see the link associated with each weblink entry ( I can still see the visit http://xyz.com link at the bottom of the node.)
But in the online version of weblinks, i dont see the link at the bottom of the weblink node. I checked the node content (by clicking on the edit link, after login) but the link field is blank. So my questions are:
01. Did i corrupt the database while upgrading the weblinks module?
02. How can I reload the old weblink content into the new database?
thanks, Paul