I tried generating a letter in Spanish. I created a template with text in Spanish. When I generated the letter all accented characters were converted into gibberish.
One of my issues has been that there are many inconsistent ways that data entry is handled in OpenEMR. It is the nature of a group of volunteers developing the code from all over the globe. But it is also the nature of the specific code selected. ALL code has their respective "reserved" characters. In PHP, an apostrophe, which looks like an accent mark, is such a character.
Some of the text fields have secondary handlers which put the data within a "baloon" to protect it and allow use of those characters, but much of the fileds in OpenEMR has no such protection.
Dr Bowen has indicated that he uses the laft leaning apostrophe, typically found on the key alongside the numeral 1 key. Others have used the double quote mark, and others the asterisk *.
The problem with all those is the data matching with X12, which ALSO uses the asterisk as a field separator, so you want to be careful.
The smartest is probably to avoid the use of those characters completely, or follow Dr Bowen’s lead, but the problems are likely for Irish surnames and the like as well. Sorry.
Where in openemr are you getting the gibberish? There are some encoding discrepancies with openemr 3.0.1 . If using special characters, probably best to force either utf-8 or latin1 throughout openemr by placing ini_set(‘default_charset’, ‘utf-8’); or ini_set(‘default_charset’, ‘iso-8859-1’); respectively at the top of global.php file. I’d rec. latin1 (iso-8859-1), since this will actually make the option of utf-8 database migration in future more straightforward. Although, if you’ve already entered utf-8 encoding into database (this is default in firefox for openemr 3.0.1), then you’ll need to go with utf-8.
I believe the trouble comes when taking the UTF-8 characters and passing them through the PDF routines that create the patient’s letter. I recall another user having trouble with a language other than English. There was no final resolution, that I heard of.
Noted this with utf-8 encoding in pdf’s also. Looks as if TCPDF is possible way to go from your forum link and from google search. The OpenEPD project has actually embedded this library in their project and appear to be using it to print out some of their forms. Would be nice to see if this works with the letter generator. If so, then could embed the php4 version of TCPDF library in a way to allow simple upgrade to the php5 version of TCPDF in the future. Now to figure out a way to get this done… Rod, do your clients need utf-8 pdf printing abilities?
Also, I noted that the letter.php script was changed to creating pdf’s several months ago via ezpdf; is there no longer the option of creating a postscript file; if so should probably yank the option menu to select this.