2010/6/22 ADnan hiddenpearls@gmail.com:
On Wed, Jun 23, 2010 at 12:33 AM, Piotr Przybylski piotr.prz@gmail.com wrote:
2010/6/22 ADnan hiddenpearls@gmail.com:
On Wed, Jun 23, 2010 at 12:09 AM, Piotr Przybylski piotr.prz@gmail.com wrote:
2010/6/22 ADnan hiddenpearls@gmail.com:
On Tue, Jun 22, 2010 at 11:55 PM, Marc Delisle marc@infomarc.info wrote:
ADnan a écrit : > hi, > > I am working with XMLWriter Extension for generating XML Documents > for > SVG,DIA,VISIO formats for generating schema .. but I noticed in > XMLWriter .. this extension just provides utf-8 encoding ..
I don't know much about this subject but please explain why generating in utf-8 encoding is a problem.
This issue is making me think that there will be problem for generating the output in different languages ..
Just make sure your data is in UTF-8, eg. use iconv() if the connection is not sending you UTF-8 responses (or, if it is unavailable, warn about it).
@Piotr I couldn't understand about the iconv() .. It is encoding conversion utility .. so, If XMLWriter deals data in utf-8 .. It would not be problem ?
things are confusing still :(
Sorry, I will explain more clearly.
If your database connection uses UTF-8 encoding to return data everything is ok. If you get responses in eg. latin1 encoding, use the iconv extension (iconv() function) to convert encodings, eg.: $latin1_data = 'some string'; $utf8_data = iconv('ISO-8859-1', 'UTF-8', $latin1_data); Then, you feed UTF-8 data to XMLWriter.
It just occured to me that you can ensure that the data you get from MySQL server is always in UTF-8. Instead of converting strings by iconv, just change connection parameters and restore them after you are done with schema export. I believe all MySQL installations should have at least utf8_general_ci and utf8_bin collations available.
How I can change/restore connection parameters ??
Ok... sorry for giving you incorrect information. I looked at phpMyAdmin's code and saw how it is handled. As far I I understand code in PMA_DBI_postConnect(), your data is guaranteed to come in UTF-8 encoding. So you don't have to worry about anything, XMLWriter is safe to use.
As for connection parameters, you can look ar MySQL's documentation [1] in your free time, as there is no need to change anything. Sorry for confusing you.
[1] http://dev.mysql.com/doc/refman/5.0/en/charset.html