Jump to content

weird characters -?


map200uk

Recommended Posts

Hi,

 

ive noticed sometimes i am getting some weird characters stored in my database as a result of reading an audio files tag data, such as

 

���������������

 

is there an easy way to possibly get rid of them? I was thinking regex them? altho im not sure what character it is, it appears as a [] in notepad and a triangle with a ? in the browser

 

 

Link to comment
https://forums.phpfreaks.com/topic/49674-weird-characters/
Share on other sites

could be qoutes. ive had trouble with those. smart qoutes like microsoft puts in a word doc like a smart left qoute and right qoute, dont take up well when stored in database, maybe cause of database character set.

 

 

anyway best option seems to be to loop through databaser and convert them into regualr qoutes...

or convert the value to the entity on php output page... a fucntion to start u off:

http://shiflett.org/blog/2005/oct/convert-smart-quotes-with-php

Link to comment
https://forums.phpfreaks.com/topic/49674-weird-characters/#findComment-243547
Share on other sites

effigy, encoding? its just dragged off the mp3 metadata to a stirng and then put into the database as a varchar, no special encoding

 

yet some files seem to work without any problems? just checked the id3 when i load the file in xmms and there's no weird characters shown, i cant see why it would do it for only some is the thing

Link to comment
https://forums.phpfreaks.com/topic/49674-weird-characters/#findComment-243591
Share on other sites

ID3v1 also lacked support for internationalization. While nominally the text was supposed to be encoded in ISO-8859-1, in practice the user's local encoding was usually used, and so mojibake are common in ID3v1 tags.

-- Wikipedia

 

Unfortunately--based on this information--there are no strict standards for ID3v1. As a result, you need to detect the encoding (unless you can safely assume that ISO-8859-1 was used all of the time), decode the data, and then re-encode the data into UTF-8 before it goes to the database.

Link to comment
https://forums.phpfreaks.com/topic/49674-weird-characters/#findComment-244514
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.