When Windows user name is English name, preview report work fine.
But Chinese name, not work and got error message below:
![Image](https://i.postimg.cc/fRHtDthT/2023-08-29-120936.jpg)
![Image](https://i.postimg.cc/FsTsJMCT/2023-08-29-120953.jpg)
![Image](https://i.postimg.cc/1t0yR2Nc/2023-08-29-121023.jpg)
![Image](https://i.postimg.cc/xTpndKq7/2023-08-29-121041.jpg)
Code: Select all | Expand
HB_CDPSELECT( "UTF8" )
Yes, I set it. but not work.nageswaragunupudi wrote:Have you included this code in your main program?If not please include this and let is know if the problem is resolvedCode: Select all | Expand
HB_CDPSELECT( "UTF8" )
Code: Select all | Expand
HB_LangSelect( "zh" )
HB_SetCodePage( "UTF8" )
HB_CDPSELECT( "UTF8" )
Fw_SetUnicode( .T. )
Mr.Raonageswaragunupudi wrote:This is happening because our metafile functions like create, open, etc are not supporting Unicode file path names.
These functions are now made Unicode compatible.
With this you will not face this problem from the next version of FWH2208 to be released.
For the present you need to bear with the problem.
Code: Select all | Expand
if ! ::lMeta
::hDcOut = ::hDC
else
::aMeta = {}
::cDir = GetEnv( "TEMP" )
if Empty( ::cDir )
::cDir = GetEnv( "TMP" )
endif
if Right( ::cDir, 1 ) == "\"
::cDir = SubStr( ::cDir, 1, Len( ::cDir ) - 1 )
endif
if ! Empty( ::cDir )
if ! lIsDir( ::cDir )
::cDir = GetWinDir()
endif
else
::cDir := GetWinDir()
endif
endif
if ::lMeta .and. ( ( ::lUseHaruPDF .and. IsHaruLinked() ) .or. ::lNativeWord )
::aCallLog := {}
else
Code: Select all | Expand
endif
::cDir := "<some directory in pure English>" // <-- Insert here
if ::lMeta .and. ........
Ok. I will try it later.nageswaragunupudi wrote:Till then, if you like, you can make a small patch in printer.prg
Please see this code in METHOD new()
Please add one line between "endif" and "if ::lMeta"Code: Select all | Expand
if ! ::lMeta ::hDcOut = ::hDC else ::aMeta = {} ::cDir = GetEnv( "TEMP" ) if Empty( ::cDir ) ::cDir = GetEnv( "TMP" ) endif if Right( ::cDir, 1 ) == "\" ::cDir = SubStr( ::cDir, 1, Len( ::cDir ) - 1 ) endif if ! Empty( ::cDir ) if ! lIsDir( ::cDir ) ::cDir = GetWinDir() endif else ::cDir := GetWinDir() endif endif if ::lMeta .and. ( ( ::lUseHaruPDF .and. IsHaruLinked() ) .or. ::lNativeWord ) ::aCallLog := {} else
like this:You choose some existing directory name which is in English, where the user has rights to create files.Code: Select all | Expand
endif ::cDir := "<some directory in pure English>" // <-- Insert here if ::lMeta .and. ........
Do not include "\" at the end.
I am using FWH 22.12 Version.nageswaragunupudi wrote:May I know your current FWH version?
Are you planning to upgrade?