Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > SUPPORT / INFORMATION > Pixelpost Help

Post Reply
 
Thread Tools
  #1  
Old 06-26-2007, 03:56 PM
jdleung Offline
pixelpost guru
 
Join Date: Feb 2006
Location: Foshan, China
Posts: 553
Smile Bug: Tag cannot works

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
Reply With Quote
  #2  
Old 06-26-2007, 04:00 PM
Dkozikowski's Avatar
Dkozikowski+ Offline
Team Pixelpost
 
Join Date: Oct 2005
Posts: 1,855
Send a message via AIM to Dkozikowski
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.
Reply With Quote
  #3  
Old 06-26-2007, 04:17 PM
jdleung Offline
pixelpost guru
 
Join Date: Feb 2006
Location: Foshan, China
Posts: 553
Smile

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
Reply With Quote
  #4  
Old 06-26-2007, 04:20 PM
Dkozikowski's Avatar
Dkozikowski+ Offline
Team Pixelpost
 
Join Date: Oct 2005
Posts: 1,855
Send a message via AIM to Dkozikowski
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.
Reply With Quote
  #5  
Old 06-26-2007, 04:24 PM
jdleung Offline
pixelpost guru
 
Join Date: Feb 2006
Location: Foshan, China
Posts: 553
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
Reply With Quote
  #6  
Old 06-26-2007, 04:29 PM
dakwegmo's Avatar
dakwegmo+ Offline
Team Pixelpost
 
Join Date: Jul 2005
Location: West of Between
Posts: 689
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
Reply With Quote
  #7  
Old 06-26-2007, 04:31 PM
Dkozikowski's Avatar
Dkozikowski+ Offline
Team Pixelpost
 
Join Date: Oct 2005
Posts: 1,855
Send a message via AIM to Dkozikowski
Quote:
Originally Posted by jdleung View Post
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.
ok, thanks.

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
Reply With Quote
  #8  
Old 06-28-2007, 02:12 PM
jdleung Offline
pixelpost guru
 
Join Date: Feb 2006
Location: Foshan, China
Posts: 553
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
Reply With Quote
  #9  
Old 06-30-2007, 01:14 PM
GeoS's Avatar
GeoS+ Offline
Team Pixelpost
 
Join Date: Apr 2005
Location: Warsaw, Poland
Posts: 3,613
Send a message via ICQ to GeoS Send a message via Skype™ to GeoS
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.
__________________
photoblog | portfolio | addons | Donate
Reply With Quote
  #10  
Old 06-30-2007, 02:52 PM
jdleung Offline
pixelpost guru
 
Join Date: Feb 2006
Location: Foshan, China
Posts: 553
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
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 01:10 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs