Japanese characters in alias

Have a translation or something? It goes here. This can mean modules, documentation, or CMSMS itself!
Post Reply
simplesimon
Forum Members
Forum Members
Posts: 17
Joined: Thu Jul 09, 2009 8:35 am

Japanese characters in alias

Post by simplesimon »

I'm not sure if this is a bad way to do it. I'm just posting this here.

in lib/misc.functions.php in function munge_string_to_url

...snip...

This is how I like my URLs. This may only work with "pretty URLs"/mod_rewrite. Full-width and normal spaces are replaced by a minus. Then all other punctuation and non-kanji/kana/roman characters minuses and underscores are discarded.

...snip...

Let me state once more, that I'm not sure if this breaks anything or even generates valid URLs.

In anyone has any comments or corrections, I'd be very interested to hear them.

Many thanks!
Last edited by calguy1000 on Thu Nov 11, 2010 11:13 am, edited 1 time in total.
kurashiki_ben
Forum Members
Forum Members
Posts: 86
Joined: Sun Jul 05, 2009 2:37 am

Re: Japanese characters in alias

Post by kurashiki_ben »

thanks for that!!
I'll try it and let you know.
kurashiki_ben
Forum Members
Forum Members
Posts: 86
Joined: Sun Jul 05, 2009 2:37 am

Re: Japanese characters in alias

Post by kurashiki_ben »

tested this and it works great so far!
I'll keep you up to date with any issues.
many thanks
Ben
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Japanese characters in alias

Post by calguy1000 »

Modifying your CMSMS install means you will not receive ANY support.
I'm keeping a list,
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
kurashiki_ben
Forum Members
Forum Members
Posts: 86
Joined: Sun Jul 05, 2009 2:37 am

Re: Japanese characters in alias

Post by kurashiki_ben »

Hi Calguy,

Of course I understand that this is the case.
However, please consider the reasons that the hack has been done.
I.e. that utf-8 characters are an integral part of urls as used in many sites around the world, and for my site we can't live without them.
See my post here" http://forum.cmsmadesimple.org/index.ph ... 746.0.html

I would like you to consider including support for utf-8 characters (at least as an option) in a future version.

Best regards

Ben
Post Reply

Return to “Translations”