-2

I have a project built in php53, Now I installed it on php56,

all characters were like

‰ أ‡أ،أڑأ‘أˆأ­أ‰ أ‡أ،أ“أڑأ¦أڈأ­أ‰ أ،أˆأ­أ¦أٹ أ‡أ،أ”أˆأ‡أˆ أٹأچأٹأ‌أ، أˆأ‡أ،أ­أ¦أ£ أ‡أ،أ¦أکأ¤أ­ أ،أ،أ£أ،أںأ‰ أ‡أ،أ“أ‡أˆأڑ أ¦أ‡أ،أ‹أ£أ‡أ¤أ¦أ¤ أ‌أ­ أ™أ، أ‍أ­أ‡أڈأ‰ أ‡أ،أ£أ،أں أ“أ،أ£أ‡أ¤ أ¦أ¦أ،أ­ أڑأ¥أڈأ¥ أ‡أ،أƒأ£أ­أ¤ أچأ‌أ™أ¥أ£ أ‡أ،أ،أ¥

i see in php.ini php5.6 default_charset ="utf8" but in php5.3 it was disable ;default_charset ="utf8"

can anyone tell me a good procedure to fix that

tung
  • 719
  • 2
  • 14
  • 30
  • 2
    Why would you want to upgrade to php version 5.6? That is _stone old_! – arkascha Apr 03 '18 at 13:22
  • 1
    [UTF-8 all the way through](https://stackoverflow.com/questions/279170/utf-8-all-the-way-through) – Lawrence Cherone Apr 03 '18 at 13:22
  • @arkascha Unfortunately, not everyone is prepared for the removal of `mysql_*` functions... – MonkeyZeus Apr 03 '18 at 13:22
  • Sure, often there are constraints dictated by reality. _But:_ that old mysql extention had been deprecated _for years_ for a reason and has been removed for a reason! It is highly insecure! – arkascha Apr 03 '18 at 13:29
  • 1
    @arkascha there are a number of good reasons for upgrading to 5.6 even today. There were breaking changes in PHP 7, so there is a strong possibility that a system written for 5.3 or earlier will break if upgraded to 7.x. It is much safer to remain at 5.x. The OP didn't specify anything about the plans after the 5.6 upgrade; it might well be a stepping stone to moving to 7.x; sometimes an upgrade has to be done in stages to maintain compatibility. In any case, 5.6 is still supported (for now at least), so is still a valid upgrade. Better than staying on 5.3, that's for sure. – Simba Apr 03 '18 at 13:43

1 Answers1

0

Looks like your PHP files saved as ANSI encoding. You should convert them into UTF-8 encoding.

Terry Lin
  • 2,529
  • 22
  • 21