[SOLVED] UTF8 &-Problem

Before you ask about IDnR Addon see the VirtueMart - Invoice, Delivery Note and Receipt Addon
Tobiwankenobi
Phoca Member
Phoca Member
Posts: 10
Joined: 09 Aug 2009, 20:33

[SOLVED] UTF8 &-Problem

Post by Tobiwankenobi »

Hi everyone,

if a shopper enters the company e.g. "Smith & Wesson" into the bill/ship to address, it will appear as "Smith & Wesson" on the PDF. Does anyone know a solution for that?

All fields of the table jos_vm_order_user_info are utf8_general_ci. Of course the whole database...

I thought about giving http://www.tecnick.com/pagefiles/tcpdf/ ... F8ToLatin1 a try?

Thanks in advance for any reply,
Tobiwankenobi
Last edited by Tobiwankenobi on 31 Dec 2009, 18:57, edited 1 time in total.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: UTF8 &-Problem

Post by Jan »

Hi, there see the Euro code in the code, maybe there will be added the same as for Euro code :idea:

Jan
If you find Phoca extensions useful, please support the project
Tobiwankenobi
Phoca Member
Phoca Member
Posts: 10
Joined: 09 Aug 2009, 20:33

Re: UTF8 &-Problem

Post by Tobiwankenobi »

Hi Jan,

thanks for your reply! Of course, unhtmlentities will help! :twisted:

I'll post the complete solution later!

Regards,
Tobiwan
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: UTF8 &-Problem

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Tobiwankenobi
Phoca Member
Phoca Member
Posts: 10
Joined: 09 Aug 2009, 20:33

Re: UTF8 &-Problem SOLVED!

Post by Tobiwankenobi »

Sorry for the delay, had a big exam to finish.

What I did is, I replaced

Code: Select all

$this->Cell(0,0,$hD['dbbt']->f("company"),0,0,'L');
through

Code: Select all

$this->Cell(0,0,$this->unhtmlentities($hD['dbbt']->f("company")),0,0,'L');
and the UTF-Problem was gone! :twisted:

Happy new year everyone!
Tobi
kseones
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 24 Aug 2010, 10:24

Re: [SOLVED] UTF8 &-Problem

Post by kseones »

A customer has written in Middle Name "Pat". I have the

Code: Select all

$hD['dbst']->f("middle_name")
in

Code: Select all

$this->unhtmlentities($hD['dbst']->f("middle_name"))
changed but in invoice still stands: "Pat"

Regards
Remzi
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: [SOLVED] UTF8 &-Problem

Post by Jan »

Hi, maybe you should use some str_replace function to remove the quotes.

Jan
If you find Phoca extensions useful, please support the project
kseones
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 24 Aug 2010, 10:24

Re: [SOLVED] UTF8 &-Problem

Post by kseones »

Thanks for the reply

here is the solution with str_replace

Code: Select all

$this->unhtmlentities(str_replace(""", "-", $hD['dbst']->f("middle_name")))
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: [SOLVED] UTF8 &-Problem

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply