1 |
On Tuesday, May 05, 2015 11:03:38 AM Joseph wrote: |
2 |
> On 05/05/15 12:32, Fernando Rodriguez wrote: |
3 |
> >On Tuesday, May 05, 2015 9:32:15 AM Joseph wrote: |
4 |
> >> I have my mysql database "Collation" set as: utf8_general_ci |
5 |
> >> |
6 |
> >> but when a customer from for example Japan places an order all I see is: |
7 |
> >> |
8 |
> >> |
9 |
> |
10 |
>竹鼻立原町5-5 |
11 |
> >> |
12 |
> >> Do I need to change "Collation" setting to something else or something |
13 |
else? |
14 |
> >> |
15 |
> >> |
16 |
> > |
17 |
> >I think that's because the web applications runs the data through something |
18 |
> >like php's htmlspecialchars() or similar to help prevent SQL injections. So |
19 |
> >you'll need to either decode it before using it (I think you can use the |
20 |
app- |
21 |
> >text/recode), or use a different method to filter anything that could be |
22 |
> >malicious SQL. |
23 |
> |
24 |
> I've saved the relevant information into a TXT file (address.txt) and tried |
25 |
to run: recode ISO-8859-9..UTF8 < address.txt > address2.txt |
26 |
> |
27 |
> |
28 |
&#31481;&#40763;&#31435;&#21407;&#30010;&#65301;&#65293;&#65301; |
29 |
> &#23665;&#31185;&#21306; |
30 |
> &#20140;&#37117;&#24066;, 601-8015 |
31 |
> &#20140;&#37117;&#24220;, Japan |
32 |
> |
33 |
> It didn't help. How do you run "recode" correctly? |
34 |
> Yes, the customer is using oscommerce php addlication to provide |
35 |
information. |
36 |
|
37 |
It looks like they ran it through the encoding function twice. This worked for |
38 |
me: |
39 |
|
40 |
recode html..utf8 < test.txt | recode html..utf8 |
41 |
|
42 |
|
43 |
-- |
44 |
Fernando Rodriguez |