473,398 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Read a file ang extract strings

J-L
Hi,

I need to read a file like this:

# Messages français pour GNU gettext.
# Copyright © 2006 Yoyodyne, Inc.
# Michel Robitaille <ro******@IRO.UMontreal.CA>, 2006.
# Christophe Combelles <cc***@free.fr>, 2006
#
msgid ""
msgstr ""
"Project-Id-Version: GNU hello-pascal 0.15-pre5\n"
"Report-Msgid-Bugs-To: bu*************@gnu.org\n"
"PO-Revision-Date: 2006-10-01 02:29+0200\n"
"Last-Translator: Christophe Combelles <cc***@free.fr>\n"
"Language-Team: French <tr****@traduc.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n 1);\n"

#: hello.hello_world
msgid "Hello, world!"
msgstr "Bonjour, le monde !"

#: hello.running_as
#, object-pascal-format
msgid "This program is running as process number %d."
msgstr "Ce programme est exécuté en tant que processus numéro %d."
and get a sortedlist with all msgid as keyz and msgstr as values.
"Hello, world!" = "Bonjour, le monde !"
"This program is running as process number %d." = "Ce programme est
exécuté en tant que processus numéro %d."

What's the best solution to do this please ?

Read all strings "one by one" ?

Jean-Luc !
Mar 25 '08 #1
0 1094

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: Jason Heyes | last post by:
Does this function need to call eof after the while-loop to be correct? bool read_file(std::string name, std::string &s) { std::ifstream in(name.c_str()); if (!in.is_open()) return false; ...
8
by: Bob | last post by:
I need to create a Regex to extract all strings (including quotations) from a C# or C++ source file. After being unsuccessful myself, I found this sample on the internet: ...
0
by: Ian M | last post by:
Hi Hope i have sent this to the correct group. I am trying to read a text file, extract data from it and then turn it into a xml file. I am using C# 2005. the data is in a text file in this...
10
by: steve | last post by:
hi i am writing a C program which can read TEXT , PDF,.DOC files the program is to : count the number of words, lines, characters and the frequency of each word and the phrases count in...
5
by: Denis Petronenko | last post by:
Hello, how can i read into strings from ifstream? file contains values in following format: value11; val ue12; value 13; valu e21;value22; value23; etc. i need to read like file >string,...
3
by: computerwolf8 | last post by:
I have a file where I know the lines go as follows: string long string int int string double
23
by: ShaneO | last post by:
Hello, I wish to extract embedded string data from a file using a Binary Read method. The following code sample is used in VB.NET and similar code is used in VB6 - (Assume variable...
3
by: maylee21 | last post by:
hi, anyone can help me figure out how to read data from a text file like this: 10980012907200228082002 and extract the data according to this kind of format: Record type 1 TY-RECORD ...
3
by: sam | last post by:
same as subject?
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.