Question

Howto handle german chars well under mono system.data.oracleclient?

Asked by: ghoki

I am using mod_mono on SuSE and apache2 to run .NET applications under mono 1.2.5.1
My issue is getting "?" instead of "§ ß .." also german chars "ä ö ü" will become "a o u" when I am using oracle connection by mono classes system.data.oracleclient.

For oracle i use the 10g express win/unix and 9i.
Situation:
- Winclient using even different NLS settings than dedicated unix db server works fine. (VS2005 dev environment)
- Unix server apache mod_mono with any NLS setting is getting "?" connecting dedicated unix db
- Unix server apache mod_mono connecting oracle 9i (also different client for 9i) is also getting the same "?" connecting dedicated unix db

Guessing:
I saw mono bugmessges saying mono is using currentCulture. Maybe mono classes are not using OCI client right regarding charsets? I tried a lot but couldn't get it. Territory to german does not help so I kept having same language seeting on client and server.

My oracle NLS settings are for example (select * from v$NLS_PARAMETERS):
NLS_LANGUAGE: AMERICAN
NLS_TERRITORY: AMERICA
NLS_CURRENCY: $
NLS_ISO_CURRENCY: AMERICA
NLS_NUMERIC_CHARACTERS: .,
NLS_CALENDAR: GREGORIAN
NLS_DATE_FORMAT: DD-MON-RR
NLS_DATE_LANGUAGE: AMERICAN
NLS_CHARACTERSET: AL32UTF8
NLS_SORT: BINARY
NLS_TIME_FORMAT: HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT: DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT: HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT: DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY: $
NLS_NCHAR_CHARACTERSET: AL16UTF16
NLS_COMP: BINARY
NLS_LENGTH_SEMANTICS: BYTE
NLS_NCHAR_CONV_EXCP: FALSE

Question: The fact that oracle is mapping "?" to chars it cannot convert when using different charsets (territories etc) I think there could be a way to get mono to use the right settings.
What am I missing here?

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2007-10-25 at 09:18:55ID22917987
Tags

mono

Topics

Mono - Multi-Platform .NET Framework

,

Oracle Database

,

C# Programming Language

Participating Experts
3
Points
500
Comments
12

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. German installation
    Hi, Oracle version: 7.3.3.0 OS version: HP/UX 10.20 I need to install Oracle7 Server in German and I would like to know: 1) What is the most common character set used in Germany? WE8DEC? 2) Do I need to set something else than database character set and NLS_LANG enviro...
  2. Will an American modem work in a German PC?
    A friend of mine from Germany wants to buy a modem in the US and use it in a German built PC. Will this work? Will the German phone cable fit the jacks? If not, is there an adapter? Anything else to be concerend about?
  3. Using English and German characters in Oracle 9.2.0.2
    Hi I've set up an Orqacle database (9.2.0.2) using UTF8 character set. The database is required to store both English and German data and therefore needs to store umlauts etc. At present an Oracle client on a Solaris box has the NLS_LANG setting set to AMERICAN_AMERICA.UTF8....
  4. Mono Installation on RHE3
    Hello, I've been trying to install Mono on Red Hat Enterprise Linux 3. So far I downloaded the rpms and installed them all using rpm -Uvh --nodeps --force *rpm. Then I installed Apache 2.50 in a different location and was sucessfully able to configure and make the mod_mon...
  5. mono
    As anyone worked or hosted a site running mono...for those unaware its a opensource development of the .NET framework for linux..or something like that :-) I was looking at installing it as a hosting platform, and moving ASP onto linux, and linking from linux to SQL server,...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: konektorPosted on 2007-10-25 at 09:52:34ID: 20149131

try place export NLS_LANG=german_germany.WE8ISO8859P1
or NLS_LANG=german_germany.AL32UTF8
into .profile of os user, under which aplication connecting to oracle tyn

 

by: ghokiPosted on 2007-10-25 at 10:38:30ID: 20149531

I tried, it didn't help.
I even added the SetEnv to apache .conf, cause otherwise mod_mono is maybe not recognizing it like the OCI lib LD_LIBRARY_PATH. env parameters are not automatically available under apache mod_mono - the interface module to mono runtime.

anyway, what I am also doing is setting the database session initially before I test the statements.
alter session set NLS_TERRITORY='germany' (for example)
Testing on windows (webserver client ASP.NET) it works fine. As soon as mono is running the code it is somewhere replacing chars to "?"

The direction mentioned is not bad - cause mod_mono could maybe not know something.

 

by: schwertnerPosted on 2007-10-29 at 00:50:42ID: 20168019

1. On the client site you have to customize the front end computer Locale
to Germany.
2. If you are using Oracle Client on the midle tier
set the NLS_LANG correctly.
3. The above points will not help you if your Oracle server is
not congigurated with correct Character set.
Good candidates for Server character sets are AL32UTF8 and WE8ISO8859P1.

To check the Character set on the server side:

SELECT value FROM nls_database_parameters
WHERE parameter = 'NLS_CHARACTERSET';

SELECT value FROM nls_database_parameters
WHERE parameter = 'NLS_NCHAR_CHARACTERSET';

 

by: ghokiPosted on 2007-10-29 at 09:27:00ID: 20170840

@schwertner: thanks for the hints. I already had a look at the database parameters (serverside) and tried set the client the same or as german.
Setting the NLS_LANG correctly is exactly my problem. It is set - but mono (guess it must be mono) is not using what is set for the oracle client on the unix system. (even not the database session parameter is used)
I want to mention again that running the app on windows .NET works fine - doen't even matter if german or american setting for the client. (same db server)

I did a lot to set up parameters: for example a script like this as .profile (and as apache2 startup using sysconfig under SuSE; further i set these parameters in vhost.conf as PassEnv() ):
-----
ORACLE_HOME=/usr/lib/oracle/11.1.0.1/client
export ORACLE_HOME
ORACLE_SID=XE
export ORACLE_SID
NLS_LANG=german_germany.AL32UTF8
export NLS_LANG
PATH=$ORACLE_HOME/bin:$PATH
export PATH
PATH=$ORACLE_HOME/lib:$PATH
export PATH
if [ $?LD_LIBRARY_PATH ]
then
      LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
else
      LD_LIBRARY_PATH=$ORACLE_HOME/lib
fi
export LD_LIBRARY_PATH
-----      

Even to know that this is a mono but is a solution, but I am not sure where to go to ask for that. Couldn't find it in mono's bugzilla yet.

 

by: schwertnerPosted on 2007-10-30 at 00:07:50ID: 20175120

Look here:
http://www.mono-project.com/FAQ:_General
http://www.go-mono.com/docs/

I had major problems wit SuSE 9 and Reporst server this summer.
Finally I gave up and have installed Reports Server on Windows 2000
because of problems with Cyrillic letters in the PDF and Word drivers.
Linux is not good for for Frontend application.

Obwohl SuSE ist sehr geliebt in Deutschland ... tut mit Leid!

 

by: ghokiPosted on 2007-10-30 at 03:51:54ID: 20175833

@schwertner: Thanks, guess these links I checked before ;)
Now I posted a bug at novel/mono to see if they figure my issue as bug. see: https://bugzilla.novell.com/show_bug.cgi?id=337624

About SuSE, the fact that it is a german distribution of linux - yes, it is wicked to use it as german. Anyway I agree that it is not the best of all. But back to the issue, I think SuSE can handle the special german chars so the problem must be somewhere else. I still guess it is mono...

PS: I also prefer windows, but customers ...

 

by: inthedarkPosted on 2007-10-31 at 04:16:41ID: 20184163

Hi guys....just a comment to say you were first to post a Mono question on EE.....


I am just starting to think about using Mono so I though there should be an EE topic.

How are you finding Mono is working out?

PS I love windows too but the problem is that MS do not consider the best interest of my customers which is why we are now on this road is it not?

 

by: schwertnerPosted on 2007-10-31 at 06:16:35ID: 20185111

Hi friends,
Happy to meet you here!
MONO seems to be a rare used product, but
there is nothing wrong to open such.

The problem is a basic problem and it is tha Linux is not
frontend OS. It is mainly a server OS. So there are great troubles
with showing characters in Frontend products if the letters are
nonenglish.

Believe me! I was blamed by the German IT office in Walldorf that
i do not agree to use SLES-9 for Cyrillic reports using Oracle Forms server.
But it was simply a very hard task, something like to declare war Russia.
So I refused to obey and now my server works under Win2000 .... einwandfrei ...
the next big error will be to use VMWare - but this is other topic ...
Saying shortly -  there are suitable Os and unsuitable OS for every given task.

 

by: inthedarkPosted on 2007-10-31 at 07:10:05ID: 20185602

I thought there were plans to add unicode to Linux?

 

by: ghokiPosted on 2007-10-31 at 08:02:46ID: 20186106

@schwertner: in my case the unix web-server is the client of the unix db-server, I don't have a unix frontend running - even if, that should work to. Becaues the frontend is a browser.
The mod_mono environment is the client of the oracle database and needs a oracle client well configured. What I guess is that I already have everything set up well - but there is still a special case with mono (mod_mono, apache2). Or an open mono bug.

@inthedark: There should be unicode. Cause as soon as I saved my win files (aspx) as unicode on the web-server (mono) they come up well in my frontend (win browser). But that was another problem I
was running into before.
+ the mono question: We as company (not just we) decided to be mono.NET/MS.NET compatible regarding C# solutions. It is not just copy the published code from VS2005 to unix/mono - but close. My opinion is you can use it - but opinions differ.

Back to my case:
It really must be the mono/oracle part that produces the problem. If you look up oracle docs the client maps "?" chars to some chars it cannot convert from one charset to another. That happens if the charset setting requested from the client is different to the on at the dbserver. As far as I got the point.

 

by: schwertnerPosted on 2007-11-01 at 01:12:35ID: 20191301

Unicode is feature of the application software.
For instance Oracle on SLES-9 uses 4 bytes Unicode
known in Oracle world as AL32UTF8.

@ ghoki
You say:
in my case the unix web-server is the client of the unix db-server. I don't have a unix frontend running - even if, that should work to. Becaues the frontend is a browser.

This is great mistake! I had the same thougts and failed in August with my Forms/Reports Server.

In fact evere server that produces output for browsers is also front-end component.
In my case the reports server has to produce PDFs and WORDS that should be displayed
via browser. It was so complex that I surrender.

The problem is how to set Umlauts on Novel.

There are some thoughts, in fact criticizm:

http://www.heise.de/ct/05/12/060/:

Windows wurde von Leuten gebaut, die in einem freundlichen, sicheren Unternehmensnetzwerk arbeiten. Unter Linux sieht man Netzwerkdaten als feindlich an. Deshalb machen sie unterschiedliche Annahmen.

http://noone.org/blog/English/Computer/SuSE/SuSE%20sucks.futile
First login
Well, I could login, the fvwm for luck seems to be a 2.5 version, so my fvwm config worked. All my xterms were there, too, xosview also and even Emacs started. Galeon didnt start of course, because it wasnt installed. mutt seemed to have UTF-8 hassles. Umlauts were blanks. And it argued about my config containing unknown variables. That should be fixable.


http://www.novell.com/documentation/suse8enterprise/pdfdoc/sles-admin-ipseries.pdf

Another problem may arise when trying to print country-specific characters,
such as umlauts. DOS and Windows use an encoding for these that is different
from Linux. Printers are mostly preconfigured for the DOS/Windows
environment. As a remedy, enter

Now i will advise to concentrate on Umlauts in SLES9 and the problems
installing National Language Support in Novell.

Search Google with keywords:  mono SLES umlauts

 

by: ghokiPosted on 2008-01-23 at 06:02:46ID: 20723331

summarized solution:

NLS_LANG=german_germany.WE8ISO8859P1
export NLS_LANG

The thing is to get the parameter set that the combination of apache, mod_mono and oracleclient is getting the parameter well. Setting the NLS on .bash_profile did not work for me on SLES but on some openSuSE as far as root was the process user of apache (wwwrun on SuSE is not a user like wwwdata and so on) .. however - the parameter NLS_LANG like above is solving the "Umlaute" issue.

Sorry, no idea why that setting did not work from the beginning. I am still struggling with the env params to be set ever (reboot, apache restart ...)

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...