fuel / core

Fuel PHP Framework - The core of the Fuel v1 framework
http://fuelphp.com
813 stars 345 forks source link

Inflector::friendly_title does not convert turkish characters. #886

Closed kesali closed 12 years ago

kesali commented 12 years ago

Inflector::friendly_title does not convert turkish characters, such as ö ş ğ ı this characters should be showing o s g i.

jschreuder commented 12 years ago

All of those are mentioned in the config file: https://github.com/fuel/core/blob/1.1/develop/config/ascii.php

Are you sure your input is UTF-8? The Inflector::ascii() method can only translate characters from a UTF-8 string successfully, all others wil just be removed most likely.

kesali commented 12 years ago

Yeah sir my inputs are utf-8 some how removing the turkish characters instead of convert them to english similiar characters.

frankdejonge commented 12 years ago

I just tested it here on latest develop and the output for me is "o-s-g-i" which is correct, can you check if your encoding is really utf-8?

kesali commented 12 years ago

Very strange i have tested on consol and local machine still removing turkish characters instead of convert maybe it is a problem with my development machine. Thanks a lot for responses i will make some more testes hopefully find the problem.

frankdejonge commented 12 years ago

The problem could be that you test this through the console, that input might not be utf-8, can you try it with a browser?

kesali commented 12 years ago

i have tested on browser aswell not only console somehow does not convert as i said its might be my development system i will test on production server and add more info.

WanWizard commented 12 years ago

@kesali any more info on this issue? If not, we'll close it.

kesali commented 12 years ago

Sorry. i have had several test on latest fuelphp on github. I havent change anything from default package only added this code echo Inflector::friendly_title('şğğşüğşüğ şüğşçüöüğ İ çö ööç hjvhj vuıoıo '); to the welcome controller - action_index ; This is the result giving me hjvhj-vuoo; And i realize the default controller is ansi coded converted to utf-8 without bom and now result is sggsgsg-sgscg-I-c-c-hjvhj-vuioio. As u can see now ö and ü removed instead of convert. My server is windows 2008 php version 5.3.10 If you need more test i will do on linux aswell.

WanWizard commented 12 years ago

If I do exactly the same here, it outputs "sggsugsug-sugscuoug-I-co-ooc-hjvhj-vuioio" which looks correct to me.

So something on your local machine is doing some conversions, as all files in the FuelPHP repo are absolutely UTF-8 encoded (without BOM). Perhaps your editor is changing it?

As it's not a problem of FuelPHP, and this is not a discussion forum, I'm closing this issue.