Solved

Importing/Exporting string tables in MS-VC++ as text

Posted on 2000-04-10
9
846 Views
Last Modified: 2012-08-13
I'm trying to export a string table as text format in order to give them to another department for translation into various languages.
Since it's not possible to just select the data in the string table and copy it and the string table data is stored as binary data in the *.rc file, I'm looking for good ideas or may me an add-in with this feature.
0
Comment
Question by:UandI
9 Comments
 
LVL 2

Expert Comment

by:Serega
ID: 2699906
You can select menu File/Save As  and select type "Resource Script" .Then save it with preferred filename.  :-)
0
 

Author Comment

by:UandI
ID: 2699935
Thank you for your suggestion, but it's not exactl what I need.
I just need the string table information from the rc file in simple text format. With Save As Resource Script I just create another *.rc file which is of no use in this matter.
Maybe you have another idea?
:-)
0
 
LVL 32

Expert Comment

by:jhance
ID: 2700006
I guess I don't understand the problem here.  

The .rc file is a straight text file already.  Just give then the whole thing.  Are you confusing the .rc file with the compiled .res file?
0
 

Author Comment

by:UandI
ID: 2700022
Well, I know that the .rc file is a text file but the string table information within is not stored as plan ASCII but as a bunch of hex-codes. Maybe I was not that clear before - sorry about that.
Pleas let me know if you have any other idea.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Accepted Solution

by:
niven earned 50 total points
ID: 2700105
If you open the .rc file in a text editor, you'll see this:

/////////////////////////////////////////////////////////////////////////////
//
// String Table
//

STRINGTABLE DISCARDABLE
BEGIN
    IDS_PROJNAME            "*"
END

(just a random .rc file, with 1 entry)

What else would you want to see?
0
 

Author Comment

by:UandI
ID: 2700115
Well, I know that the .rc file is a text file but the string table information within is not stored as plan ASCII but as a bunch of hex-codes. Maybe I was not that clear before - sorry about that.
Pleas let me know if you have any other idea.
0
 

Expert Comment

by:niven
ID: 2700132
I just added the String 'ID_STRING101' with caption "This is an example" to the above String Table, when I view the .rc file, I see:

STRINGTABLE DISCARDABLE
BEGIN
    IDS_PROJNAME            "*"
    IDS_STRING101           "This is an example"
END

So I'm afraid I cant find the hex-codes anywhere....
0
 

Author Comment

by:UandI
ID: 2700133
Thank you! I guess I was looking at the wrong part of the rc-file. I didn't realize that I was lookin at the dialog info part.
0
 
LVL 22

Expert Comment

by:nietod
ID: 2700140
>> .rc file is a text file but the string table
>> information within is not stored as
>> plan ASCII but as a bunch of hex-codes.
A string table is almost always specified as plain ASCII in the .rc file.

I don't know why yours would be in HEX. I suspect someone or something did something wrong in the file's past that produced this.  Or perhaps the information came from reverse engeneering a program.  

But if you convert the string table to ASCII (manually, or write a little conversion program to do it) you should be fine.  The table should remain ASCII after that.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now