Solved

unable to decode spanish character while exporting csv

Posted on 2014-02-18
6
152 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 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to "ASSIGN" a RecordID based on 1st character of a Field? 8 36
SQL HELP 2 88
Upgrading SQL 2005 Express to 2008 R2 Express 31 93
View SQL 2005 Job package 16 43
This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 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