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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:23:24+00:00 2026-06-16T22:23:24+00:00

I have a dll written in C#. One of the methods takes a parameter

  • 0

I have a dll written in C#. One of the methods takes a parameter string txt. The dll is being called from a classic asp page. At the time of calling, the text contains the character é which is obtained by holding down ALT and typing 130 on the number pad or by holding down ALT-GR and hitting e.

The DrawString method is outputting it wrong. I realize there is a character set/font issue, but I don’t know how to get round the problem.

What I get on a British keyboard and localization using Arial font is a capital A with a tilde above it followed by lowercase c in a circle.

The individual entering the text may be using any keyboard layout, may have any localization on their PC, but they will all be entering it via our web page.

What do I need to do to make things compatible or to convert?

The relevant bit of code is:

Bitmap image = new Bitmap(strFilePath);

Graphics m_graphics;
m_graphics = Graphics.FromImage(image);

Font fnt = new Font("Arial", 12.0f);

StringFormat strFormatter = new StringFormat();

SolidBrush txtBrush = new SolidBrush(Color.FromArgb(127, Color.FromArgb(int.Parse("AB12CD", NumberStyles.HexNumber))));

m_graphics.DrawString("é", fnt, txtBrush, new Point(200, 200), strFormatter);
  • 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-06-16T22:23:25+00:00Added an answer on June 16, 2026 at 10:23 pm

    As your string of text is coming from a web page, it could be URL encoded.
    Try decoding it first, and making sure the result is UTF8:

    string strDecoded = HttpUtility.UrlDecode(strEncoded, Encoding.UTF8)
    
    m_graphics.DrawString(strEncoded, fnt, txtBrush, new Point(200, 200), strFormatter);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a DLL, written in XE2 that takes a PChar as a parameter
I have written a VC++ dll. The declaration for one of the methods in
I have a very simple DLL written in unmanaged C++ that I access from
I have written a C++ Dll which has two functions, one writes a binary
I have an unmanaged DLL that gets called from .NET with pre-allocated buffers to
I have written an unmanaged c++ dll that works good (IPinvoke))) There is one
I have written a DLL in C++. One of the functions writes to a
I'm pretty new in C#. I have Dll written on C++ by myself and
I have a DLL that is written in C++ and I want to suppress
I have a test suite DLL written in C# that uses Selenium.This is then

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.