Questions tagged [string-table]

32 questions
31
votes
7 answers

Where do Java and .NET string literals reside?

A recent question about string literals in .NET caught my eye. I know that string literals are interned so that different strings with the same value refer to the same object. I also know that a string can be interned at runtime: string now =…
Motti
  • 110,860
  • 49
  • 189
  • 262
14
votes
2 answers

String table in ELF

I get some symbol and I get (a hexdump of) an ELF file. How can I know in which section this symbol appears? What is the difference between .strtab and .shstrtab? Is there another array of symbol strings? When I get an index for the symbol names…
user1479376
  • 327
  • 1
  • 2
  • 10
13
votes
4 answers

Static string literal table?

What is the correct way in C++ to create a global & static table of strings? By "global", I mean: Useable from any file that includes the header. But not part of some run-time created singelton objcet. By "static", I mean: As little run time set up…
nonot1
  • 2,788
  • 4
  • 25
  • 41
9
votes
2 answers

VC++ 10 MFC: What is the correct way to do localization

I am a .NET guy who is having to do some work on an MFC app. The app is a VS2008 MFC executable which I have converted to VS2010. The original developers did localisation by specifying the name of a .txt file with key value pairs in it on the…
MrLane
  • 1,728
  • 22
  • 41
9
votes
4 answers

printf() debugging library using string table "decoder ring"

I'm writing to see if any of you have ever seen or heard of an implementation of the idea I'm about to describe. I'm interested in developing a printf-style debugging library for an embedded target. The target is extremely remote, and the comms…
jeremytrimble
  • 1,814
  • 1
  • 18
  • 22
4
votes
2 answers

Distinguish .shstrtab and .strtab in ELF file

I'm wondering how a .shstrtab is identified compared to a .strtab when parsing an ELF file? From reading elf(5) - Linux manual page both are of section header type SHT_STRTAB, so how would I know if the one I encounter is one or the other? Their…
MulattoKid
  • 573
  • 6
  • 14
2
votes
2 answers

MFC - Manually expand stringtable

Can anyone provide an explanation or a link that explains how exactly a STRINGTABLE in a MFC resource file is defined and can be manually expanded? I tried to do it, but failed to do so in a multi project solution. Most projects in said solution…
red_rain
  • 398
  • 4
  • 15
2
votes
2 answers

Any Working code for cross platform message catalog without having to duplicate the message strings?

On linux, gencat works beautifully with .msg file with gencat, catopen, catgets and catclose On Windows, mc or rc file's stringtable works beautifully with LoadString. Just wondering if there is any working implementation of gencat on windows. I…
2
votes
2 answers

Can I bind my HTML elements' text to an object of strings?

I'm making a web application using jQuery. All the elements of the web applications are created using jQuery (var $header = $("
");). I already have an object called stringtables where I have sub-objects called "no", "en" etc. On page load the…
Hubro
  • 56,214
  • 69
  • 228
  • 381
1
vote
0 answers

Numbering of the entries in the STRINGTABLE of an .exe

In Delphi, the entries in the STRINGTABLE resource in the .exe file are created automatically. The numbering (resource-id) of the entries is managed by Delphi itself, and this cannot be changed. Is there a possibility to influence this numbering in…
Bruno
  • 11
  • 1
1
vote
1 answer

Determine which STRINGTABLE is included in EXE

My Delphi application uses the Microsoft Resource Compiler (rc.exe) to compile a list of strings (text format in a .rc file) like this: Language LANG_KOREAN, SUBLANG_KOREAN STRINGTABLE BEGIN cszLanguageName "Korean" END into a .res…
AlainD
  • 5,413
  • 6
  • 45
  • 99
1
vote
1 answer

c++ visual studio resources

I am trying to implement a String Table in resource file .rc and then load specific string using function CString::LoadStringW(). This is the code main.cpp: #ifndef _AFXDLL #define _AFXDLL #endif #include #include #include…
1
vote
4 answers

Designators in c89

C99 allows array initializers (among others) to specify which element of the array is being set with a positive integer designator ($6.7.8.6, $6.7.8.17), for example like so: const char *foo[] = {[2] = "foo", [1] = "bar", [0] = "baz"}; I have…
nebuch
  • 6,475
  • 4
  • 20
  • 39
1
vote
1 answer

How to create a string table

Strangely there's almost no online documentation on this subject. I have an application with hard coded strings for the UI and various other things scattered through the source. I'm attempting to round up at least some of them because a number of…
pdel
  • 685
  • 12
  • 23
1
vote
1 answer

Searching .init section in ELF file

How can I find section .init? Section header has field Elf32_Word sh_name. So I suppose I have to go through all sections to find one with name .init But sh_name is not an array of chars. It is an index of entry in String Table. Where is String…
Qwerty
  • 153
  • 1
  • 9
1
2 3