0

This field name is Brand, Defined as UTF8 Characterset

Value is:

  • C†Cell Premium Battery
--> It displaying like this.

See there is a character â€, I tried to replace that value of †with Spaces, but its not happening.

I tried REPLACE(Brand,'â€',''), But i am getting the same string.

Any suggestion on how to remove that.

I am not trying to change the table. The value in the table its present like that SELECT Brand, REPLACE( Brand, 'â€', '' ) FROM INFO WHERE ASIN = 'B001RQD01W' I got the result like below, I.e that character not removed "

  • C†Cell Premium Battery
" "
  • C†Cell Premium Battery
" For both same result.

Even though it displayed as Câ€, But in column value of the table it stored as C”. Hence the below step worked. REPLACE( Brand, 'C”', '' )

Regards Vikram

user3080572
  • 65
  • 1
  • 1
  • 4
  • Can you please show us exactly what statements you have tried to use to remove the characters? `REPLACE()` doesn't necessarily make any changes to the database. – Air Dec 16 '13 at 17:40
  • 1
    Are those characters actually in the database or is that what is returned in the query response? If those characters are coming from the query, can you show us the query? – TheCarver Dec 16 '13 at 17:42
  • UPDATE table SET Brand=REPLACE(Brand,'â€','').But you probably need http://stackoverflow.com/questions/279170/utf-8-all-the-way-through – Mihai Dec 16 '13 at 17:42
  • I am not trying to change the table. The value in the table its present like that SELECT Brand, REPLACE( Brand, 'â€', '' ) FROM INFO WHERE ASIN = 'B001RQD01W' I got the result like below, I.e that character not removedl "
    • C†Cell Premium Battery
    " "
    • C†Cell Premium Battery
    " For both same result.
    – user3080572 Dec 16 '13 at 17:49
  • Are you viewing the query result in MySQL Workbench? In a web browser? In an IDE? – Air Dec 16 '13 at 18:16
  • After exporting result in CSV i am seeing – user3080572 Dec 16 '13 at 18:17

1 Answers1

0

If you have only this one record, why try replacing an already bad string, just force an update... something like

update Info 
   set brand = 'CAE Cell Preimium Battery'
   where ASIN = 'B001RQD01W'

Now, I would not do this if it was impacting more than one row, or do multiple individual based on the limited condition that 'bad' characters are in the string, but Just force the new value (not sure if 'CAE' is what is should be, but just an example)

DRapp
  • 47,638
  • 12
  • 72
  • 142