|
#1
|
|||
|
|||
|
I tried to insert tags for an image, English works. But it refused to insert Chinese. If I write a tag: "标签_tag_中文", the database will be saved as "_tag_". If I insert the tag directly using phpmyadmin, the Chinese will be displayed in mess.
What's wrong here?
__________________
jdleung's.com @ flickr @ fotoblogs.cn & Addons:Month Calendar & Slideshow & Flickr comment & Modified Addon: Calendar |
|
#2
|
||||
|
||||
|
what do those symbols represent?
As far as I know, and it's not much, I was not aware that programing languages accepted characters as such.
__________________
Pixelpost Documentation | Visual Pixels | My Addons | Transition Bottlerocket Fund |
|
#3
|
|||
|
|||
|
Admin->edit image
![]() the tags should contain chinese words at the begining and the end. the chinese word seems cannot insert into database and cannot be displayed.
__________________
jdleung's.com @ flickr @ fotoblogs.cn & Addons:Month Calendar & Slideshow & Flickr comment & Modified Addon: Calendar |
|
#4
|
||||
|
||||
|
Ok, i see. so they are not being saved to the database correctly.
We'll take a look into this. thanks for pointing it out.
__________________
Pixelpost Documentation | Visual Pixels | My Addons | Transition Bottlerocket Fund |
|
#5
|
|||
|
|||
|
Not only saving problem but also displaying problem. because I had tried to write chinese directly into database via phpmyadmin, but it displays in a mess.
__________________
jdleung's.com @ flickr @ fotoblogs.cn & Addons:Month Calendar & Slideshow & Flickr comment & Modified Addon: Calendar |
|
#6
|
||||
|
||||
|
I tested this in a dev environment. When I am editing an image, if I enter any chinese characters into the tag field, they don't make it into the database. I can enter chinese in the title or description fields and they go through just fine and everything gets inserted. (Though if you look at the DB in phpMyAdmin the characters look like this: æ ‡ç¾_tag_䏿–‡).
Also, if I enter the tag via phpMyAdmin, the characters are displayed just fine too, but in the DB they converted into character escapes like this: 标签_tag_中文.
__________________
My Photoblog If you find my help useful please consider feeding the PixelPost Kitty If you're short on cash just feed my ego |
|
#7
|
||||
|
||||
|
Quote:
Just to verify, this is only an issue on the edit page? The new image page works as it should? Or is this just a tag specific issue on all pages where tags are edited / added
__________________
Pixelpost Documentation | Visual Pixels | My Addons | Transition Bottlerocket Fund |
|
#8
|
|||
|
|||
|
ok, I add this in function save_tags_new
$pat1 = '/([^\x00-\xff][^a-zA-Z 0-9_-]+)/'; it works fine. but another problem, the chinese tag link looks like this /index.php?x=browse&tag=%E6%A0%87%E7%AD%BE it means $_GET['tag']= "%E6%A0%87%E7%AD%BE", so it doesn't work when click a chinese tag link. how can I judge if the tag is chinese or english? urldecode function? but if a tag has chinese and english, the tag link will look like this:"%E6%98%AF%E7%9D%A1english_tag". How can I only pick the chinese out? and decode it? and then put them together again so that the tag can be search from the database? thanks.
__________________
jdleung's.com @ flickr @ fotoblogs.cn & Addons:Month Calendar & Slideshow & Flickr comment & Modified Addon: Calendar |
|
#9
|
||||
|
||||
|
As I was a creator of tag support and didnt know any fine working solution supporting special chars for it then I added support only for text using a-zA-Z 0-9_- marks.
If you know any good solution for putting it into the url and picking it back from it for DB search process then feel free to PM me with few example links. |
|
#10
|
|||
|
|||
|
Geos, I get it works. I'll PM you the link.
__________________
jdleung's.com @ flickr @ fotoblogs.cn & Addons:Month Calendar & Slideshow & Flickr comment & Modified Addon: Calendar |
| Post Reply |
| Thread Tools | |
|
|