Punycode for Filename Fields

7 posts by 2 authors in: Forums > CMS Builder
Last Post: July 27, 2010   (RSS)

Re: [yusuke] Punycode for Filename Fields

By Jason - July 22, 2010

Hi,

The string you posted is Japanese text that has been encoded so it can be added to the URL string. If you want to translate this back into its Japanese form, you can use a function called urldecode. Try this:

$encodedString = "%e3%82%b3%e3%83%b3%e3%83%86%e3%83%b3%e3%83%84%e3%83%9e%e3%83%8d%e3%83%bc%e3%82%b8%e3%83%a1%e3%83%b3%e3%83%88%e3%82%b7%e3%82%b9%e3%83%86%e3%83%a0";
$decodedString = urldecode($encodedString);
echo $decodedString;


Try running that code, it should display the Japanese text for you.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Punycode for Filename Fields

By yusuke - July 22, 2010

Hi Jason,

Thanks for the code!

I just don't know where/how to insert the code.
I'd like to have url links automatically created using Filename Fields.

Re: [yusuke] Punycode for Filename Fields

By Jason - July 23, 2010

Hi,

If you could provide me with a link to the site and attach your .php code to this thread, I can take a closer look for you.

Thanks.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Punycode for Filename Fields

By yusuke - July 26, 2010

Hi Jason,

In fact, there is no viewer (.php) code involved for this.

I am looking for the way to insert punycode encoded text to Filename Fields under Viewer Urls so the created url displays decoded text.

Can it be done?

Re: [yusuke] Punycode for Filename Fields

By Jason - July 27, 2010

Hi,

You can't use these php functions directly in your Filename Fields list inside CMS Builder. You would have to use this code in your viewer page

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Punycode for Filename Fields

By yusuke - July 27, 2010

Hi Jason,

OK. It's clear now!

Thanks!