Solved

unable to decode spanish character while exporting csv

Posted on 2014-02-18
6
160 Views
Last Modified: 2014-09-25
while exporting csv in windows its decoding Spanish characters correctly.However,in Linux its showing Spanish characters appending extra letters.

I am using SQL Server 2005 for DB storage and Jetty6 as my application. while defining Database i have used Collation "SQL_Latin1_General_CP1_CI_AS" .


In database it is store like" Félix" whereas in csv output is coming "Félix" this.

Please help.

Thank you
0
Comment
Question by:aloknet21
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 7

Accepted Solution

by:
Kishan Zunjare earned 30 total points
ID: 39866858
Please check the Data type of  column where you are storing values... it has to NVARCHAR or NTEXT.
0
 
LVL 1

Author Comment

by:aloknet21
ID: 39867174
Yes it is already NVARCHAR. it is like:

first_name(nvarchar(max),not null)
last_name(nvarchar(max),not null)
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 39881263
Please check the Data type of  column where you are storing values... it has to NVARCHAR or NTEXT.
This is not correct as anyone knows that uses Spanish.  You do not need unicode in order to support Spanish.  Now if you want to define all the char data types as unicode, that is fine, it is just that you are going to use double the space.
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 1

Author Comment

by:aloknet21
ID: 39894422
Thanks for your reply. We need to get all columns with Spanish Character thats why we are defining all the column as NVARCHAR.

The Linux system is already defined with Unicode.

then also its not working.

Please suggest any exact solution if possible.

Thanks
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 39895677
We need to get all columns with Spanish Character thats why we are defining all the column as NVARCHAR.
Once again, this is not correct you do not need Unicode to support Spanish.  A small SQL script would prove this to you and you would not have to repeat this myth over and over.
Now, if you want to use unicode, then more power to you.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 39895683
In case you are not familiar with Spanish characters here is an example of a script to show you how nvarchar is not required:
DECLARE @SpanishText TABLE (Value varchar(50))

INSERT  @SpanishText
        (Value)
VALUES  ('Año'),
        ('áéíóúü'),
        ('ÁÉÍÓÚÜ')

SELECT  *
FROM    @SpanishText

Open in new window

0

Featured Post

Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question