From the doc: http://dev.mysql.com/doc/refman/5.0/en/select.html
It said:
...SELECT ... INTO OUTFILE... Column
values are dumped using the binary character set.
Is it possible to export the OUTFILE as latin1 or UTF8 with SELECT ...
INTO OUTFILE syntax?
Thanks
You can SELECT using CONVERT(colname USING latin1) for all the columns
you want in latin1, etc.
--
When C++ is your hammer, everything looks like a thumb.
-- Steven M. Haflich
Yes, already tried, in the console it print correct character, but
when exported to file using ".. INTO OUTFILE..", it still showing
strange characters.
Unless you're piping that file through xxd or some similar hex-viewing
tool, how do you know exactly whether it's weird or right? (And I hope
you know what utf8 data looks like when it's right at a glance... I do,
but I work with the stuff every day. Is a field with "Campo Mourão" in
it screwed up or are you just looking at it with a terminal using a
different encoding?
--
CANNIBAL, n.
A gastronome of the old school who preserves the simple tastes and adheres
to the natural diet of the pre-pork period.
On Oct 10, 6:08 am, "Peter H. Coffin" <hell...@ninehells.com> wrote:
> Unless you're piping that file through xxd or some similar hex-viewing
> tool, how do you know exactly whether it's weird or right?
The column contains UTF8 characters,
if I use "tee /tmp/1.sql", and issue the select query, it give me the
correct encoding.
If I use select into outfile, it give me weired encoding.
Both files are viewed in OpenOffice, and different encoding settings.