On Wednesday 10 July 2002 10:16 am, Tom Howe wrote:

You can simply configure MySQL to use whatever character set you want... I'd 
have to go look at the docs, but my recollection is that ISO-8859-1 is the 
default encoding and in the my.cnf's [server] section you can specify a 
different encoding, though in that case MySQL has to have been compiled with 
support for that character set enabled. IIRC modern compiles have all the 
character sets enabled.

The big limitation still with MySQL is that you can only have one encoding 
SERVER-WIDE. There is no way to specify it per column, table, or even 
database. Also I don't think UTF-8 is directly supported right now, but I 
could be wrong on that score...

In any case its not really necessary to do conversions. In fact the only 
thing MySQL uses "character set" for is to define the text collation order, 
so unless you care about doing ORDER BY on text columns it matters not one 
bit, internally its all binary data to the database anyhow, and perl will 
treat it all as UTF-8 (at least newer versions of perl will).

> We use this ...
>
> sub convert {
>   my $string = shift;
>   my $map = Apache::AxKit::CharsetConv->new('ISO-8859-1', 'UTF-8');
>   return $map->convert( $string );
> }
>
> On Wed, 10 Jul 2002, Nigel Peck wrote:
> > The data is coming from a MySQL database, does anyone have any idea how
> > to check/change the encoding in use?
> >
> > Thanks
> > Nigel
> >
> > >>> Robin Berjon <[EMAIL PROTECTED]> 07/10/02 01:13pm >>>
> >
> > On Wednesday 10 July 2002 14:04, Nigel Peck wrote:
> > > So why does XML::XPath error on the n' in don't?
> >
> > The likeliest reason is that your file isn't in the correct encoding.
> > Accents
> > and co will cause trouble if the parser expects UTF-8 but you have you
> >
> > content in another encoding.
> >
> > --
> > Robin Berjon <[EMAIL PROTECTED]> -- for hire:
> > http://robin.berjon.com/
> >   Radioactive cats have 18 half-lives.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > ITM Business Solutions
> > Unit 4
> > Nine Trees Trading Estate
> > Morthen Road
> > Rotherham
> > S66 9JG
> >
> > Reception
> > Tel: 01709 703288
> > Fax: 01709 701549
> >
> > Help Desk
> > Tel:01709 530424
> > Fax: 01709 702159
> >
> > CONFIDENTIALITY NOTICE: This message is intended only for the use of
> > the individual or entity to which it is addressed, and may contain
> > information that is privileged, confidential and exempt from disclosure
> > under applicable law.
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to