?
Solved

unable to decode spanish character while exporting csv

Posted on 2014-02-18
6
Medium Priority
?
165 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
  • 3
  • 2
6 Comments
 
LVL 7

Accepted Solution

by:
Kishan Zunjare earned 120 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

850 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