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 7458099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T13:24:20+00:00 2026-05-29T13:24:20+00:00

If I persist a windows-1252 string (e.g. something with smart quotes) from C# to

  • 0

If I persist a windows-1252 string (e.g. something with “smart quotes”) from C# to a record into a SQLServer db, is the encoding preserved if I read it back out into another string variable?

  • 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-29T13:24:21+00:00Added an answer on May 29, 2026 at 1:24 pm

    Yes, no or maybe.

    Each VARCHAR column in SQL Server has a “collation”, roughly equivalent to a codepage (character set) plus a sort order.

    If the codepage of the collation can store all the characters in the string they should round-trip properly. If not, not.

    If your collation is a variant of Latin1_General you should be able to store the whole windows-1252 character set.

    For more, see here:

    • Windows Collation Name:
      http://msdn.microsoft.com/en-us/library/ms188046.aspx
    • Collation and International Terminology: http://msdn.microsoft.com/en-us/library/ms143726.aspx
    • Char and Varchar: http://msdn.microsoft.com/en-us/library/ms176089.aspx

    Note that if you haven’t set a collation on the field, it will use the database’s default collation, which is usually Latin1_General_CI_AS.

    It is important to be aware of character set issues. If you need to store characters in one field which cannot all be fitted into the same codepage you need to use NVARCHAR. In an NVARCHAR field, all characters can be stored and the collation only controls the sort order and equality comparisions.

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

Sidebar

Related Questions

I'm not sure if I'm missing something obvious, with Windows Workflow used from within
Given a .NET environment with Windows CE, can you persist thousands of records per
I am trying to persist an Entity with a @Lob annotated String field. The
I have an IScriptControl that needs to persist data from the user across postbacks.
I recently migrated a database from sql server 2005 to 2008 on windows server
I'm writing a Windows service which needs to persist some data across reboots/restarts of
I have a Windows Phone application I am developing that needs to persist some
Since (html5) localStorage and its equivalencies persist in between tabs and windows, I've thought
I'm currently trying to persist a canvas to a bitmap, and I've run into
Exactly what the title says. Here's my connection string: \SQLEXPRESS;Database=GGDBase;Integrated Security=SSPI;Trusted_Connection=true;Persist Security Info=False; The

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.