Re: [PHP] Charset and filenames
Gustavo Lopes wrote: I'm building a script that makes a list of files available in a directory (PHP 4.3.10, Apache 2.0.53, windows, NTFS file system). The XHTML is served as ISO-8859-1. However, I'm having trouble in generating correct links for files with accents, etc. The problem is rawurlencode() appears to convert strings by translating I don't suppose there's any way to just rename the file... You may be able to do the urlencode() and then un-do the %3E back to, err whatever it was. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Charset and filenames
I appreciate your reply but I'm not satisfied. Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Gustavo Lopes wrote: I'm building a script that makes a list of files available in a directory (PHP 4.3.10, Apache 2.0.53, windows, NTFS file system). The XHTML is served as ISO-8859-1. However, I'm having trouble in generating correct links for files with accents, etc. The problem is rawurlencode() appears to convert strings by translating I don't suppose there's any way to just rename the file... I don't want to rename any file, just change a link destination by encoding the filename differently. You may be able to do the urlencode() and then un-do the %3E back to, err whatever it was. What? Where did you get that %3E from? Gustavo Lopes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Charset and filenames
Gustavo Lopes wrote: I appreciate your reply but I'm not satisfied. Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Gustavo Lopes wrote: I'm building a script that makes a list of files available in a directory (PHP 4.3.10, Apache 2.0.53, windows, NTFS file system). The XHTML is served as ISO-8859-1. However, I'm having trouble in generating correct links for files with accents, etc. The problem is rawurlencode() appears to convert strings by translating I don't suppose there's any way to just rename the file... I don't want to rename any file, just change a link destination by encoding the filename differently. You may be able to do the urlencode() and then un-do the %3E back to, err whatever it was. What? Where did you get that %3E from? I think he was just typing off memory and quoted a different encoded char... my encoding battles are always a trail and error affair until 'it' does what I want... but maybe these 2 functions may help you: http://nl2.php.net/manual/en/function.utf8-encode.php http://nl2.php.net/manual/en/function.utf8-decode.php Gustavo Lopes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Charset and filenames
Jochem Maas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Gustavo Lopes wrote: I appreciate your reply but I'm not satisfied. Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Gustavo Lopes wrote: I'm building a script that makes a list of files available in a directory (PHP 4.3.10, Apache 2.0.53, windows, NTFS file system). The XHTML is served as ISO-8859-1. However, I'm having trouble in generating correct links for files with accents, etc. The problem is rawurlencode() appears to convert strings by translating I don't suppose there's any way to just rename the file... I don't want to rename any file, just change a link destination by encoding the filename differently. You may be able to do the urlencode() and then un-do the %3E back to, err whatever it was. What? Where did you get that %3E from? I think he was just typing off memory and quoted a different encoded char... my encoding battles are always a trail and error affair until 'it' does what I want... but maybe these 2 functions may help you: http://nl2.php.net/manual/en/function.utf8-encode.php http://nl2.php.net/manual/en/function.utf8-decode.php Gustavo Lopes Thank you, utf8_encode() is in fact the solution to my problem. A function $s - htmlentities(rawurlencode(utf8_encode($s))) seems to be able to produce correct output for every file. Gustavo Lopes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP charset encoding
Hello Nabil, Good to see you here :) I hope you solved the problem. anyway, i would like to make a comment about something: The Charset is defined in many places, If you are using HTML in the meta Tag Apache, PHP, Header(). you can use all these methods to specify the charset, what i suggest to use, is to get a network sniffer, or to get the Live HTTP Headers Plugin for firefox. Try to find out what is EXACTLY being sent to the browser. Wish you best of Luck , Ammar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP charset encoding
Nabil wrote: Hi all, I have problem storing the submitted data in the database in the right encoding. I need to use UTF-8 I need to save the Arabic text in UTF-8 encoding. I have a problem with UTF-8 and windows-1256 conversion. I wish I can understand those things, coz encoding thing will take my hair off When submitting a data from an HTML page and inserting them in MySQL: what encoding they will be ? is it the page encoding? I *think* that MySQL 4.1+ supports your encoding. You can check their online documentation, specifically: http://www.mysql.com/doc/en/Charset-se-me-sets.html the field size like VARCHAR 15 won't fit the same in both encoding for the same text. !! Is the font any relation with encoding? phpmyadmin doesn't support UTF-8 so dumping your data using it will screw it up is it a way to convert it inside the database... Are you using php 4.1+? If so, then you can at least test what values are in your forms by trying a snippet like so (you may have a lot of data to go through, but it should be there): echo 'pre'; print_r($_REQUEST); echo '/pre'; Explain to me please , or if you can tell me where to find my answers (not google) I'm sure you hate to hear this, but I found the answer to your first question with a search engine. May I make a suggestion? Try downloading Mozilla Firefox http://texturizer.net/firefox/download.html#release When you've installed the appropriate version for your OS, install this plugin: http://mycroft.mozdev.org/download.html# Read how to use it at that site, and the next time you want an answer that you might find in online documentation you can quickly find it with your new tool. Nabil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] charset
Depends on what Chinese charset you want. Simplified Chinese or Traditional. GB or BIG5 Use a meta content type for the charset type for simplified meta http-equiv=content-type content=text/html; charset=gb2312 for traditional META http-equiv=Content-Type content=text/html; charset=big5 eg head titleYahoo! China - NA?¢FOD1u/title meta http-equiv=content-type content=text/html; charset=gb2312 /head ¦n¤F?? Lawrence. -Original Message- From: Maxim Maletsky [mailto:[EMAIL PROTECTED]] Sent: August 21, 2001 2:03 PM To: Maxim Maletsky; 'Mark Lo'; [EMAIL PROTECTED] Subject: RE: [PHP] charset P.S: just as in this email :-) Maxim Maletsky -Original Message- From: Maxim Maletsky Sent: Tuesday, August 21, 2001 3:02 PM To: 'Mark Lo'; [EMAIL PROTECTED] Subject: RE: [PHP] charset Chinese charset. Maxim Maletsky -Original Message- From: Mark Lo [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 3:03 PM To: [EMAIL PROTECTED] Subject: [PHP] charset Hi, What could be wrong if I don't specific the CHARSET in my webpage. If my webpage will display both chinese and english, then what charset should i use. Thank you Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] charset
Chinese charset. Maxim Maletsky -Original Message- From: Mark Lo [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 3:03 PM To: [EMAIL PROTECTED] Subject: [PHP] charset Hi, What could be wrong if I don't specific the CHARSET in my webpage. If my webpage will display both chinese and english, then what charset should i use. Thank you Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] charset
P.S: just as in this email :-) Maxim Maletsky -Original Message- From: Maxim Maletsky Sent: Tuesday, August 21, 2001 3:02 PM To: 'Mark Lo'; [EMAIL PROTECTED] Subject: RE: [PHP] charset Chinese charset. Maxim Maletsky -Original Message- From: Mark Lo [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 3:03 PM To: [EMAIL PROTECTED] Subject: [PHP] charset Hi, What could be wrong if I don't specific the CHARSET in my webpage. If my webpage will display both chinese and english, then what charset should i use. Thank you Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] charset win1251
Hi Maxim, You are probably only one in this mailing list with experiance of work with russian language in PHP, I have another qwestion concerning Opera and textarea - I can't make Opera to accept cyrillic text in textareas, I mean I can type in Russian but can't insert russian text (tried various formats) into textarea in Opera. I have Russian Opera 5.12 and russificated Windows ME in settings of Opera all fonts are cyrillic, I have already 4 years experianse of working with Opera but actually never knew that it has such problem =(( I'm mostly worried about visitours of my site who use Opera, they will not be able to save data in database because they will have this prob with textarea. By the way texarea is working wonderfully with IE. and I tried to add different charsets and lang variables to textarea HTML-tag didn't work any way. Youri -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] charset win1251
Hello BRACK, Thursday, August 09, 2001, 10:19:46 PM, you wrote: B I finished English version of my site and wanted to start Russian B part but realized that MySQL server returnes all data in koi-8r B charset which is not very comfortable for some of the users, B specially I know that A LOT of russians using Opera brawser older B versions of which do not support koi-8 Any one knows how to B convert koi-8 results of MySQL to win1251? It depends. What charset is your data in? If you DB's data is already in koi-8r, ther only thing you can do at the database level is to use a query: SET CHARACTER SET koi8_cp1251 and then execute your queries. All the data will be converted to win1251 codepage on the fly. Alternately, you can place all the data to the database in 1251 charset, and then compile mysqld with option --with-charset=cp1251 (used in ./configure) Then you'll have all the data returned in cp1251, and mysql will sort all the text data using that charset. To have the data returned in koi-8 in this case you'll have to issue a query SET CHARACTER SET cp1251_koi8 By the way, there's not so many russians, if any, using the old Opera browsers :) -- Best regards, Maxim Derkachev mailto:[EMAIL PROTECTED] System administrator programmer, Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 www.books.ru, www.symbol.ru -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] charset
http://www.w3.org/TR/WD-html40-970708/charset.html -Original Message- From: Mark Lo [mailto:[EMAIL PROTECTED]] Sent: 12 iulie 2001 08:46 To: [EMAIL PROTECTED] Subject: [PHP] charset Hi, What will the problem if i don't specific what charset to use in the metal tag. And also, what is the CHARSET of UTF-8. What charset to use if i want my web page to display chinese and english. Thank you Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]