php-i18n Digest 20 Oct 2005 10:20:08 -0000 Issue 297

Topics (messages 881 through 887):

Re: Problem with special chars.
        881 by: Michael Wallner
        882 by: Tex Texin
        883 by: Erfan Shirazi
        884 by: Michael Wallner
        885 by: Erfan Shirazi
        886 by: Jochem Maas

file_exists('$B4A;z(B.gif') returns false
        887 by: Jonny Bergström

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Hi Erfan Shirazi, you wrote:


> And this works just fine, everything looks as it should, but when I save
> it to a file, this is how it looks:
> "MALMÖ, ASUNCIÓN

Ö == Ö
Ó == Ó

I don't see any error...?

Regards,
-- 
Michael - <mike(@)php.net> http://dev.iworks.at/ext-http/http-functions.html.gz

--- End Message ---
--- Begin Message ---
Why are you specifying HTML-ENTITIES, if you don't want them?


> -----Original Message-----
> From: Erfan Shirazi [mailto:[EMAIL PROTECTED] 
> Sent: Friday, October 14, 2005 3:05 AM
> To: [email protected]
> Subject: [PHP-I18N] Problem with special chars.
> 
> 
> Hi all
> 
> 
> I have some problems when I make a string containing the following 
> "Malmö, Asunción" to capital letters and then save it to a file.
> 
> I use the following to make it to capital letters:
> $msg = mb_strtoupper($msg, "HTML-ENTITIES");
> 
> And this works just fine, everything looks as it should, but 
> when I save 
> it to a file, this is how it looks:
> "MALM&Ouml;, ASUNCI&Oacute;N
> 
> It seems it has problems with "ó" and "Ö", does anybody know how this 
> can be solved? I have tried some different encodings but 
> nothing helps, 
> I'm using PHP 4.3.2.
> 
> Thx in advance for all help.
> 
> /Erfan
> 
> -- 
> PHP Internationalization Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--- End Message ---
--- Begin Message --- The problem is if I don't specify and encoding even an echo() on the string shows strange chars when I have made a mb_strtoupper() on the string. With HTML-ENTITIES at least it looked ok when you made an echo()
but when saved in file it looks bad.

Does anybody now what I can do in order to make the string into capital letters, be able to save it to a file and looking as it should look, that is: Asunción and not ASUNCI&Oacute;N?

/Erfan

Erfan Shirazi wrote:
Hi all


I have some problems when I make a string containing the following "Malmö, Asunción" to capital letters and then save it to a file.

I use the following to make it to capital letters:
$msg = mb_strtoupper($msg, "HTML-ENTITIES");

And this works just fine, everything looks as it should, but when I save it to a file, this is how it looks:
"MALM&Ouml;, ASUNCI&Oacute;N

It seems it has problems with "ó" and "Ö", does anybody know how this can be solved? I have tried some different encodings but nothing helps, I'm using PHP 4.3.2.

Thx in advance for all help.

/Erfan

--- End Message ---
--- Begin Message ---
Hi Erfan Shirazi, you wrote:
 
> Does anybody now what I can do in order to make the string into capital
> letters, be able to save it to a file and looking as it should look,
> that is: Asunción and not ASUNCI&Oacute;N?

1. Specify the charset the string is in http://php.net/mb_strtoupper
2. Specify the charset you are using in your HTML page

Regards,
-- 
Michael - <mike(@)php.net> http://dev.iworks.at/ext-http/http-functions.html.gz

--- End Message ---
--- Begin Message --- I have tried every encoding which could be found in: http://www.php.net/manual/en/ref.mbstring.php

But nothing seems to work, I don't have any problems displaying the funny chars in the browsers, there are some encodings which works fine for that, the problem is when I save it to a file using fwrite().


Michael Wallner wrote:
Hi Erfan Shirazi, you wrote:
Does anybody now what I can do in order to make the string into capital
letters, be able to save it to a file and looking as it should look,
that is: Asunción and not ASUNCI&Oacute;N?


1. Specify the charset the string is in http://php.net/mb_strtoupper
2. Specify the charset you are using in your HTML page

Regards,

--- End Message ---
--- Begin Message ---
Erfan Shirazi wrote:
I have tried every encoding which could be found in: http://www.php.net/manual/en/ref.mbstring.php

But nothing seems to work, I don't have any problems displaying the funny chars in the browsers, there are some encodings which works fine for that, the problem is when I save it to a file using fwrite().

there is no problem - you are writing to the file exactly what you asked for - 
namely
a string changed to uppercase with all characters that have html entities 
converted as
such.

have you read the manual? rather than just stare at it.

$str = "Asunción";
var_dump( mb_strtoupper($str, "ISO-8859-1"), mb_convert_case($str, 
MB_CASE_UPPER) );

if I run that code (on the cmd line, but that should make no difference) I get:

string(8) "ASUNCIÓN"
string(8) "ASUNCIÓN"

as you see there are no html entities BECAUSE I DIDN'T ASK FOR THEM.

oh and stop cross-posting.



Michael Wallner wrote:

Hi Erfan Shirazi, you wrote:
Does anybody now what I can do in order to make the string into capital
letters, be able to save it to a file and looking as it should look,
that is: Asunción and not ASUNCI&Oacute;N?



1. Specify the charset the string is in http://php.net/mb_strtoupper
2. Specify the charset you are using in your HTML page

Regards,



--- End Message ---
--- Begin Message ---
Hi

file_exists('漢字.gif')

always returns false using such filenames. Anyone have any ideas?

--- End Message ---

Reply via email to