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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:50:09+00:00 2026-06-07T00:50:09+00:00

Here is a problem that has been bothering me a lot about Python, I

  • 0

Here is a problem that has been bothering me a lot about Python, I could really use some help on this:

I’m trying to read some string from a file. The files are .rc suffix where one kind of localized strings are inside for each file. Based on different languages, I used different codepage to decode. Here I only take French file as an example and its code page is 1252. Sadly, every time if there is a double quotes, when I print the string in Python shell, there will be two double quotes unexpectedly.

The line in .rc source file:

La fonction “Test de télécopie” vérifie.

The output string in Python shell:

La fonction “”Test de télécopie”” vérifie.

Some activities I did:

f = open(filename,"r")         #Used to open .rc source file
for strline in f.readlines():  #Used to read file line by line
    print strline                #Used to print in Python shell

Additional Info:

a. The double quotes Hex code in .rc source string is: 

b. If I open the .rc source file with web browser, it also displays two double quotes unexpectedly.

c. The .rc source file is confidential, so I didn’t attach here.

d. OS: Enu Win7 x64\Python: v2.7

I’m a newbie for Python. Any ideas will be really really appreciated.

Best Regards,
😉

  • 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-07T00:50:10+00:00Added an answer on June 7, 2026 at 12:50 am

    All the misunderstanding comes from that I’m not familiar with .rc files (I never used C++ before) and how does the developer handle the strings. Don’t punch me if my answer looks so untutored. 🙂

    After talking with the relevant developers, it’s confirmed to be a mechanism added by the .rc file creators which is used to handle the double quotes in strings.

    Like a string below:
    GUI expects-How are you, “Mark”?

    In .rc(or web browser)-“How are you, “”Mark”””?

    The .rc file creators add this mechanism of adding one more double quotes to surround the original ones in strings, to ensure once the string is called to display in GUI, it will not be recognized as:
    -“How are you,”Mark”?” ==>”How are you,” Mark “?”==>This would be a messy double quotes match which the GUI can not display correctly.

    So I added a filter to remove this additional double quotes in order to get what I want. And I believe it’s easy for the Python users.

    It’s not a professional answer, but I just hope to let the people who encountered same problem think from a different way.

    I really appreciate to everybody that helped me identify the problem above before.

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

Sidebar

Related Questions

I know that this has been talked about many times here, and I have
I've run into the problem that has been addressed here without a workaround: I
This is not a unique problem that has not been there in the past,
I have a problem that has been bothering me now for a few days.
I a problem that has been driving me nuts for awhile now. Here is
Here's my problem: there's an internal issue tracking system that has a nice summary
Here's a problem I've had recently that just HAS to be a common pain
I have an interesting SQL problem that I need help with. Here is the
I have a problem that has been bugging me all day. In my code
I hope this isn't too vague, but I'm stuck on a problem that has

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.