Mismatch charset while executing application on Windows and Wine (Ubuntu) - utf-8

We have a small exe client application that used for loading the scanned images from the remote sources, what we need to do is enter the address from the images to specific text box and submit.
The data then will be saved in remote database and will be read by another apps.
When we run the client application on Windows, everything is normal. The problem only happen when we run application on Ubuntu via Wine:
Whether we input the address that contain German characters, the other apps will read from database the wrong characters, for example:
What we enter:
Lößnitzstr
What the other apps see:
Lößnitzstr
We found out this is mismatch charset when encoding with UTF-8 and decode with Windows-1252 code page.
Since the default charset of Ubuntu is UTF-8, we tried to use command line to force WINE to run with windows charset setting:
LANG=de_DE.CP1252 wine client.exe
We also tried to set Operating system default locale by localectl to language with charset Windows-1252 (CP1252) but it seem not to work
Any idea how to fix this, really appreciate your help.

Related

Weblogic 12c (12.1.3) installation on Unix - garbled character in GUI over xMing

I am installing weblogic 12c (12.1.3) on RHEL (Red hat enterprise Linux Server 7.1) using GUI Mode. I am using X11 forwarding using XMing and connecting to the server over SSH using Putty.
When I run the command "java -jar Weblogic/fmw_12.1.3.0.0_wls.jar" it shows some initial error as "Checking monitor: Must be configured to display 256 bit color" Failed. I ignored the installation and went ahead.
But when the GUI opened the characters are scrambled and unreadable as the image attached next
Weblogic GUI - Not readable
I tried installation using both JDK 1.7 and 1.8 and had the similar results
I seems to be issue with some character encoding but was not able to figure out. I checked the Unix $LANG environment variable and it is set properly to "en_US.UTF-8" I checked Putty if there is any option related to encoding. And found one under Window > Translation > Remote Character Set and the value is set as UTF-8
I checked by copying text inside the text box beside the Browse equivalent one, and pasted it in notepad. The text is valid in notepad
I found the solution to the issue with the help of the Unix team.
I checked for other GUI installer like IBM Unica Campaign. I got the similar issue. So I was sure it has nothing to do with the installer. Either something with the SSH pipe or something in the server. I shared the details of one server where it worked fine earlier and asked Unix team to compare the packages.
Unix Admin team found that the issue might be due to the font lyx-fonts which didn't exist in the server where it was working fine. The font was removed by Unix admin team. After that the installer was showing correct string.
I had the same problem. However, if you install all prerequisite packages (see the requirements guide of Oracle Fusion Middleware 12c) for Linux then the problem disappears. Specifically you must install redhat-lsb-4.1-27.0.1.el7 for x86_64 (Redhat or OEL 7). This installs the lyx-fonts again, but also some stuff that makes your X-Windows display ok again.
Also I had the same issue. I solved it. I just install the package "xorg-x11-fonts-Type1"

How to make sure correct .BUD files are generated for print driver after a Windows Upgrade

After upgrading Windows 10 anniv. to Windows 10 creators update my own virtual printer (based on unidrv) is unavailable. When I select it in control panel I get a dialog to install a driver (which I ignore) and by pressing cancel you see the printer properties which are readonly (unavailable).
The problem seems to be related to an incorrect .BUD file being generated. When replacing the incorrectly generated .BUD file after the Creators upgrade with a .BUD file (saved after getting the printer driver working) the driver works. (tested this by doing update restore etc..)
Via process monitor I see one access denied followed by lots of success for the CreateFile operation for .BUD files.
So I was wondering: why is that .BUD file generated incorrectly?
While searching I've found this https://superuser.com/questions/17981/why-is-my-current-printer-unavailable-in-office/70477#70477 which guides you to https://web.archive.org/web/20150511125304/https://support2.microsoft.com/default.aspx?scid=kb;en-us;873396
Quote from the KB:
"This problem occurs because you do not have the permissions that are
required to create or re-create a parsed binary printer description
file (.bud). "
Has anyone experience with this? I'm looking for a way to prevent that such a .BUD file for the printer driver is incorrectly generated after a major Windows Upgrade.
Are there things that should be added to the registry or specific files on the pc to make sure that upgrading Windows doesn't make the printer driver invalid?
Or how do you make sure the driver automatically has all correct permissions?
Hopefully there are some experts here on SO that can show the real cause and how to prevent it.

What is the valid printer name in Windows?

I was tasked to create a screen to input a description and a printer name installed on the back-end server. This facility will be used in the front-end to print documents directly to the server's installed printers. The printer name input should be validated to only accept a valid printer name.
I searched in google and was not able to find a document or post that tells what are the valid/invalid characters for Windows printer names.
I just want to confirm with the Windows guys if someone knows what exactly are the documented valid/invalid characters for printers names.
There doesn't seem to be an authoritative description in the specs however if you try and add a printer with an obviously incorrect name you get:
Clearly you need to avoid '\' and ',', it's probably a good idea to avoid '/' as well.
This post contains a list of all forbidden names in Windows. This applies to files and folders as well as device names.

Difference between TEXT mode and ASCII mode in File transfer through FTP?

I am facing a strange issue when transferring file through WinSCP FTP tool.
I downloaded a shell script file from server and made some minor modification. Uploaded this file on same UNIX server through WinSCP Tool.
When I select Transfer settings as Binary, Shell script doesn't work properly and failed. Even generated log file didn't open.
When I select Transfer settings as TEXT it worked properly.
Also, when I set Transfer settings as ASCII in File transfer through FTP command in Terminal, even it didn't work.
On the basis of above issues, I have below concerns:
Difference between TEXT mode transfer and ASCII mode
transfer?
Difference between transferring file through FTP command
via Terminal and using FTP tool like WinSCP, FileZilla, FireFTP?
I think it has to do with translation between Newlines, Carriage Returns and NL/CR combinations. i.e. Transfering a text file from a DOS machine to a UNIX machine, ASCII mode will to the proper translation, and "TEXT" mode (which I believe is really "binary" mode) will just transfer as-is, with no translation.
There's no difference between "text" and "ascii" transfer mode. These are just two names that are used interchangeably for the same mode.
There should be no difference between the text/ascii mode in GUI FTP clients and the Windows command-line FTP client.
Though the can be some implementation detail that might make a difference for a particular server.

Oracle Reports Font Subsetting

I have an Oracle Reports 10g rdf which uses an non-standard font which gets garbled when the client machine doesn't have the font installed. My clients machines are Windows-based in major and my server is Linux-based
I searched for information on the internet and stumbled on Font Subsetting configuration, which worked fine on my local machine, generating PDF files with the font incorporated. This PDF opened in all machines without problem.
I've done this steps on my server:
I copied the font TTF file (inthrp48dmtt.ttf) to u01/app/oracle/product/10.1.2/frm10g/reports/templates
In uifont.ali file, located at /u01/app/oracle/product/10.1.2/frm10g/guicommon/tk/admin/, i added:
At [GLOBAL] section
"IntHrP48DmTt" = inthrp48dmtt
At [PDF:Subset] section
inthrp48dmtt = "inthrp48dmtt.ttf"
I installed the font inthrp48dmtt.ttf to the folder /usr/share/fonts/IntHrP48DmTt and executed the command fc-cache /usr/share/fonts/IntHrP48DmTt/
Restarted the Reports Server
After all this steps, the font still garbled up. Anyone has any idea?

Resources