?
Solved

unable to decode spanish character while exporting csv

Posted on 2014-02-18
6
Medium Priority
?
162 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 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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

771 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