Utf-8 characters problem

tanasi wrote on Wednesday, June 27, 2012:

Hi,
I am using openemr and I am very excited about it. Its really useful. But I have a problem. I use openemr in greek language so i need to use utf-8 character encoding. When i select the greek language for interface in the login panel everyhthing is Ok. The interface is in greek, I can enter greek names in patients etc. The only problem is with billing. If I select “checkout” from fees menu in the description field I get non recognizable characters instead of the words that I have typed. I checked the corresponding entries in phpmyadmin and they are ok. So the problem is somewhere else. I have downloaded the xampp version with openemr preinstalled. Can you please help?

bradymiller wrote on Thursday, June 28, 2012:

Hi,

Did you check the cod_text entries in the billing sql table? I can’t confirm this bug on the development version. The thing that is suspicious is the following though at openemr/interface/patient_file/pos_checkout.php :

  write_form_line($code_type, $brow['code'], $brow['id'], $thisdate,
    ucfirst(strtolower($brow['code_text'])), $brow['fee'], $brow['units'],
    $taxrates);

Suggest removing the ucfirst and strtolower fucntion calls (ie. just leave $brow bare) and see if that works. If this works, please let us know, and we’ll then make this change in the main codebase and the next 4.1.0 patch.

thanks,
-brady
OpenEMR

tanasi wrote on Thursday, June 28, 2012:

Hi Brady,
many thanks for your detailed answer. Yes I had checked the entries in MySQL db (cod_text) and everything was showing correclty. Thats why I thought it should be somewhere in php as everything else worked flawlessly…

I can confirm that leaving bare $brow works!!! So you can mark the topic as solved!
Many many thanks. I have spent hours trying to solve the problem and fortunately you had the solution…
Keep on the good work
BR

tanasi wrote on Thursday, June 28, 2012:

I spotted the problem also in the diagnosis.php.
There the code is ucwords(strtolower($iter))
should i leave it like :  $iter)  ?

bradymiller wrote on Thursday, June 28, 2012:

Hi,
Although I am pretty sure that script is no longer used, wouldn’t hurt yank that also(interface/patient_file/encounter/diagnosis.php). Will plan o change both of these in the main codebase and next 4.1.0 patch.
thanks,
-brady

bradymiller wrote on Friday, June 29, 2012:

Hi,

Just committed this to sourceforge (so will be in the next release) and also will include this fix in the next 4.1.0 patch.

thanks,
-brady
OpenEMR