Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 972095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:04:03+00:00 2026-05-16T03:04:03+00:00

I have a Java application decoding a UTF-8 encoded String received over the wire

  • 0

I have a Java application decoding a UTF-8 encoded String received over the wire and saving it to a varchar column in my database (SQL Server 2000). I am saving the record using JDBC’s CallableStatement (calling the setString method to set the parameter for this column).

The problem I’m seeing is that a particular String has been written that contains ASCII value 0 (NUL). This suggests to me that SQL server cannot represent a particular Unicode character and the JDBC driver has decided to substitute in ASCII value 0, although I may be wrong.

  • Has anyone else encountered this problem?
  • Is there a mechanism I can use to cause the CallableStatement call to fail in this situation?

Ideally I would like to guarantee that data has been saved exactly as specified, or else “fail fast”.

My database character set is Latin1_General_AS_CS.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T03:04:04+00:00Added an answer on May 16, 2026 at 3:04 am

    You need to be using ‘NVARCHAR’ type in the database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a java-application using JDBC for database interaction. I want to do a
Imagine the next architecture: We have Java application over Spring framework (let's call it
I have Java application which sends pointer to function (callback) to some native dll
I have a Java application that run as a background service, i.e. no GUI.
I have a java application where main class is dependent with some other classes.
I have my java-written application being killed after some time of work. Java application
I have a java application 'JA' and a Java project containing a servlet project
I have a java application which needs to read and write files to HDFS.
I have a java application that people can log into (and do various things
I have an Java application running in JBoss in which I have enabled JMX

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.