Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
URL and japanese
  • Hello,

    My website is multilangual : english, french, spanish, japonese etc.
    I don't speek japanese and don't know too much how work a japanese websites, but I suppose it's the same as in another langages.

    So I try to put japanese char in the URL. But when I use Uri::create, some characters are transorm.
    Exemple : 
    "/あなたのコンパニオンを選択します.html"
    transform to : 
    "/�_��_��_��_�コンパニオンを�_�択�_��_��_�.html"

    Some char arethe same, and the others ... It like the is a encoding problem. But all is in UTF-8.


    FuelPHP is popular in Japan. I hope you could help me.
  • HarroHarro
    Accepted Answer
    Where exactly does it transform? What did you try and didn't work?

    As far as I can see, the URI class has no issue with any utf-8. As you say, Fuel is used a lot in Japan, if this would have been a framework issue, it would have been reported years ago.

    So for the moment I think it's either your code or your development environment. For example, are you perhaps using Windows, and trying to use utf-8 in filenames?
  • Sorry, I found a class who extend the Fuel URI class. That's the problem.
    Thanks.

    The problem came from this line : 
    $url = urldecode(http_build_url($url, array('scheme' => $secure ? 'https' : 'http')));

    I replace it in : $url = str_replace('http://', 'https://', $url); and it works


Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion