sql - MYSQL translate escaped HEX liked string to human readable -


this supposed spanish words. imported words dictonary in txt format. spanish 1 got translated these. thing cant search word. not find anything. how can convert these in mysql human readable , searchable string?

create table if not exists `es_words` (   `id` int(11) not null auto_increment,   `word` varchar(255) character set utf8 collate utf8_unicode_ci not null,   `user` int(11) not null,   primary key (`id`) ) engine=innodb  default charset=latin1 auto_increment=660099 ;  insert `es_words` (`id`, `word`, `user`) values (1, 'ÿþa\0\r\0', 0), (2, '\0a\0-\0\r\0', 0), (3, '\0a\0a\0r\0ó\0n\0i\0c\0o\0\r\0', 0), (4, '\0a\0a\0r\0o\0n\0i\0t\0a\0\r\0', 0), (5, '\0a\0b\0a\0\r\0', 0), (6, '\0a\0b\0a\0b\0a\0\r\0', 0), (7, '\0a\0b\0a\0b\0i\0l\0l\0a\0r\0s\0e\0\r\0', 0), (8, '\0a\0b\0a\0b\0o\0l\0\r\0', 0), (9, '\0a\0b\0a\0c\0á\0\r\0', 0), (10, '\0a\0b\0a\0c\0a\0l\0\r\0', 0), etc 

i don't know many spanish words looking @ strings in example seem words have null characters (\0) , carriage returns (\r) inserted seemingly @ random between each letter. better clean whatever generated insert query rather trying clean database after fact think.

that being said query allow search , display human readable values.

select *  (select replace(word, '\0', '') fixedword es_words) t fixedword '%aaronita%' 

you use results of above query clean values in table think focus on trying find out '\0' , '\r' coming in insert statement.


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -