PDA

View Full Version : MySql-query to update filenames


pmquist
04-04-2016, 06:14 AM
I would like to have help with a sql query to change filenames on attached files in vB5. Today the attachments are named with strange characters and i would like an upgrade query where this is made "normal" again.

For example i would like

ö to equal ö

Ã¥ to equal ?

ä to equal ä

The file this is stored is in yyy_attach and the fieldname is "filename"

Regards / PerOla

Dave
04-04-2016, 10:48 AM
Looks like vBulletin 5 doesn't correctly decode the characters.

You could run queries such as:
UPDATE yyy_attach SET filename = REPLACE(filename, "ë", "ë")

pmquist
04-04-2016, 10:53 AM
Looks like vBulletin 5 doesn't correctly decode the characters.

You could run queries such as:
UPDATE yyy_attach SET filename = REPLACE(filename, "ë", "?")

Thank You! I will try that.

--------------- Added 1459775257 at 1459775257 ---------------



Regards / PerOla