Sorry if I was very snappy earlier, haven't slept for ages and totally lost it.
There is a ready made library for iconv utf-8 support: https://github.com/tchwork/utf8/blob...Shim/Iconv.php
Seems it could possibly be incorporated to support other encodings. this is from forceutf8 at encoding.php:
Code:
* It may fail to convert characters to UTF-8 if they fall into one of these scenarios:
*
* 1) when any of these characters: ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞß
* are followed by any of these: ("group B")
* ¡¢£¤¥¦§¨©ª«¬##®¯°±²³´µ¶•¸¹º»¼½¾¿
* For example: %ABREPRESENT%C9%BB. «REPRESENTÉ»
* The "«" (%AB) character will be converted, but the "É" followed by "»" (%C9%BB)
* is also a valid unicode character, and will be left unchanged.
*
* 2) when any of these: àáâãäåæçèéêëìíîï are followed by TWO chars from group B,
* 3) when any of these: ðñòó are followed by THREE chars from group B.
The database in question is ancient and has been around since early 2000 and db-tables use utf-8(so it supports newly named utf8mb4 if I have understood right) and must accomodate all sorts of peculiar strings because related to technical products and language is not english to begin with. DB is ancient, converted possibly many times to support those and I suspect it contains åö䩪«¬##® etc chars. So the db connection is utf-8 in configure.php
and I am not sure if you try to import öä宩ª strings to it and have mysql db connection of utf8 and db tables utf-8 with myisam. What will happen? mysql utf8 connection means 3-byte character support right? So I am in terrible trouble if I try to squeeze 3 byte stuff which requires special chars in 4 byte environment?
I guess myisam is a good enough storage engine still for lots of reads and less writes. I have still no proper testing environment so can not simply test things out. Thanks to our very sluggish hosting operator.
Db currently anyways works and shows special characters right. Reason I must understood this thorough is that we are planning (or my boss is planning) to accomodate extra 30-70K products into that db. This tool would be a great help say for transferring few thousand products at a time. Next part is perhaps more complex but I tried to start with this.
Sorry for lengthy post.
Bookmarks