473,763 Members | 6,149 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Anyone recognise this coding scheme?

Rob
I've trying to import a CSV file exported from another application but it
uses some encoding scheme I've not seen before:

19/02/2007,106478,Bob Elder,Sinking Ship,Macclesfie ld,Cheshire,8," Mike\'s
\Rude Awakening\"""""

The \' sequence is a single quote but that \Rude Awakening\"""" is a little
strange. I think it means take Rude Awakening and prefix it by the next
character after the final "\" but that's a guess.

Anyone recognise this encoding scheme?

Thanks, Rob.

PS. I've asked if we can find out from the original application authors but
they've not responded yet.
Jan 20 '08 #1
7 1452
Rob,

This will be not the only CSV file build on some own ideas

Cor
Jan 20 '08 #2
Is there, in fact a line break between "Mike\'s and \Rude Awakening\"""""
or is it, in fact, "Mike\'s \Rude Awakening\"""""

It might sound like a moot point but it could have an impact on how you
interpret it.

I don't think that it is an 'encoding scheme' perse, rather, it looks to
me like an 'escaping scheme' of some description.

In some escaping schemes a \ followed by another character acts as a
signal.

For example, in C# the escape sequence \r means a carriage return and the
escape sequence \n means a line feed. Often you see them together as
carriage return/line feed pair as in \r\n.

Another example, is where you are building a SQL string and you want an
apostrophe to be preserved in a name rather than being treated as a string
delimiter. For this one would code, in VB.Net, " ...'O''Brien'.. ." but, in
C# one would code " ...'O\'Brien' ...".

Again in C#, the sequence \" serves to imbed a quote in a string to give
the same effect as specifing the quote charracter twice in VB.Net.

In the example data you have given, only the \' makes any sense, and so I
suspect that the escaping scheme is bespoke and only the author will be
able to tell you how to interpret the escaped characters.
"Rob" <rob_nicholson@ nospam_unforget table.comwrote in message
news:kI******** **********@news fe4-gui.ntli.net...
I've trying to import a CSV file exported from another application but it
uses some encoding scheme I've not seen before:

19/02/2007,106478,Bob Elder,Sinking Ship,Macclesfie ld,Cheshire,8," Mike\'s
\Rude Awakening\"""""

The \' sequence is a single quote but that \Rude Awakening\"""" is a
little strange. I think it means take Rude Awakening and prefix it by the
next character after the final "\" but that's a guess.

Anyone recognise this encoding scheme?

Thanks, Rob.

PS. I've asked if we can find out from the original application authors
but they've not responded yet.
Jan 20 '08 #3

"Stephany Young" <noone@localhos twrote in message
news:es******** ******@TK2MSFTN GP03.phx.gbl...
Is there, in fact a line break between "Mike\'s and \Rude Awakening\"""""
or is it, in fact, "Mike\'s \Rude Awakening\"""""
HAHAHAHA... RFC 4180 specifies breaks using the Augmented Backus-Naur Form.
If there were a line break there you'd see it.
It might sound like a moot point but it could have an impact on how you
interpret it.

I don't think that it is an 'encoding scheme' perse, rather, it looks to
me like an 'escaping scheme' of some description.

In some escaping schemes a \ followed by another character acts as a
signal.

For example, in C# the escape sequence \r means a carriage return and the
escape sequence \n means a line feed. Often you see them together as
carriage return/line feed pair as in \r\n.

Another example, is where you are building a SQL string and you want an
apostrophe to be preserved in a name rather than being treated as a string
delimiter. For this one would code, in VB.Net, " ...'O''Brien'.. ." but, in
C# one would code " ...'O\'Brien' ...".

Again in C#, the sequence \" serves to imbed a quote in a string to give
the same effect as specifing the quote charracter twice in VB.Net.

In the example data you have given, only the \' makes any sense,
LMAO
and so I
suspect that the escaping scheme is bespoke and only the author will be
able to tell you how to interpret the escaped characters.
LMAO - you're blubbering and babbling incoherently just so you can post and
gain the power of the illusion of puffing up your horribly sunken chest, you
less than witless cretin.

RFC 4180 explictly states that literal double quotes that are not delimiters
must be escaped so that they can be distinguished from delimiters that are
also double quotes.

If double-quotes are used to enclose fields, then a double-quote
appearing inside a field must be escaped by preceding it with
another double quote.

Jan 21 '08 #4
Rob
I don't think that it is an 'encoding scheme' perse, rather, it looks to
me like an 'escaping scheme' of some description.
I think you are correct and actually I think the enclosing is broken. I've
now got a way to reach the developers. Consider this string:

Taylor's "Old Head"

The encoding should replace single quote with \' and double quote with \""
which makes sense.

However, what it's doing is shuffling the double quotes to the end so you
get:

Taylor\'s \Old Head\""""

It should be:

Taylor\'s \""Old Head\""

I think it's a bug...

Rob.
Jan 22 '08 #5
That flame was totally uncalled for.

If you think that every CSV file in the world follows RFC 4180 you are sadly
mistaken.

--
David Streeter
Synchrotech Software
Sydney Australia
"Guru" wrote:
>
"Stephany Young" <noone@localhos twrote in message
news:es******** ******@TK2MSFTN GP03.phx.gbl...
Is there, in fact a line break between "Mike\'s and \Rude Awakening\"""""
or is it, in fact, "Mike\'s \Rude Awakening\"""""

HAHAHAHA... RFC 4180 specifies breaks using the Augmented Backus-Naur Form.
If there were a line break there you'd see it.
It might sound like a moot point but it could have an impact on how you
interpret it.

I don't think that it is an 'encoding scheme' perse, rather, it looks to
me like an 'escaping scheme' of some description.

In some escaping schemes a \ followed by another character acts as a
signal.

For example, in C# the escape sequence \r means a carriage return and the
escape sequence \n means a line feed. Often you see them together as
carriage return/line feed pair as in \r\n.

Another example, is where you are building a SQL string and you want an
apostrophe to be preserved in a name rather than being treated as a string
delimiter. For this one would code, in VB.Net, " ...'O''Brien'.. ." but, in
C# one would code " ...'O\'Brien' ...".

Again in C#, the sequence \" serves to imbed a quote in a string to give
the same effect as specifing the quote charracter twice in VB.Net.

In the example data you have given, only the \' makes any sense,

LMAO
and so I
suspect that the escaping scheme is bespoke and only the author will be
able to tell you how to interpret the escaped characters.

LMAO - you're blubbering and babbling incoherently just so you can post and
gain the power of the illusion of puffing up your horribly sunken chest, you
less than witless cretin.

RFC 4180 explictly states that literal double quotes that are not delimiters
must be escaped so that they can be distinguished from delimiters that are
also double quotes.

If double-quotes are used to enclose fields, then a double-quote
appearing inside a field must be escaped by preceding it with
another double quote.


Jan 23 '08 #6
HAHAHAHA... RFC 4180 specifies breaks using the Augmented Backus-Naur Form.
If there were a line break there you'd see it.
Re-reading your reply, could you explain what you mean by the above comment?

Because either you don't know what BNF is used for, or you were unable to
adequately communicate your meaning.

BNF is a human readable language used to present the grammar of a file
format. Computers don't use it.

And in any case, according to http://www.rfc-editor.org/rfc/rfc4180.txt,
RFC4180 specifies line breaks that occur inside an "escaped" field are
represented by ASCII &H0A or &H0D, which last time I looked were
non-printing. So you wouldn't see them.

You, sir, appear to have no idea what you are talking about.
--
David Streeter
Synchrotech Software
Sydney Australia
"Guru" wrote:
>
"Stephany Young" <noone@localhos twrote in message
news:es******** ******@TK2MSFTN GP03.phx.gbl...
Is there, in fact a line break between "Mike\'s and \Rude Awakening\"""""
or is it, in fact, "Mike\'s \Rude Awakening\"""""

HAHAHAHA... RFC 4180 specifies breaks using the Augmented Backus-Naur Form.
If there were a line break there you'd see it.
It might sound like a moot point but it could have an impact on how you
interpret it.

I don't think that it is an 'encoding scheme' perse, rather, it looks to
me like an 'escaping scheme' of some description.

In some escaping schemes a \ followed by another character acts as a
signal.

For example, in C# the escape sequence \r means a carriage return and the
escape sequence \n means a line feed. Often you see them together as
carriage return/line feed pair as in \r\n.

Another example, is where you are building a SQL string and you want an
apostrophe to be preserved in a name rather than being treated as a string
delimiter. For this one would code, in VB.Net, " ...'O''Brien'.. ." but, in
C# one would code " ...'O\'Brien' ...".

Again in C#, the sequence \" serves to imbed a quote in a string to give
the same effect as specifing the quote charracter twice in VB.Net.

In the example data you have given, only the \' makes any sense,

LMAO
and so I
suspect that the escaping scheme is bespoke and only the author will be
able to tell you how to interpret the escaped characters.

LMAO - you're blubbering and babbling incoherently just so you can post and
gain the power of the illusion of puffing up your horribly sunken chest, you
less than witless cretin.

RFC 4180 explictly states that literal double quotes that are not delimiters
must be escaped so that they can be distinguished from delimiters that are
also double quotes.

If double-quotes are used to enclose fields, then a double-quote
appearing inside a field must be escaped by preceding it with
another double quote.


Jan 23 '08 #7
"SurturZ" <su*****@newsgr oup.nospamwrote in message
news:BF******** *************** ***********@mic rosoft.com...
That flame was totally uncalled for.

If you think that every CSV file in the world follows RFC 4180 you are
sadly
mistaken.
Please show where I echoed any thoughts of that kind. Failure to put up will
be taken as proof that you attempted to create an argument based on a wholly
imaginary event that never took place.

So, how long have you suffered delusions?
Jan 23 '08 #8

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

Similar topics

699
34114
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it could be possible to add Pythonistic syntax to Lisp or Scheme, while keeping all of the...
176
8178
by: Thomas Reichelt | last post by:
Moin, short question: is there any language combining the syntax, flexibility and great programming experience of Python with static typing? Is there a project to add static typing to Python? Thank you, -- greetz tom
0
1330
by: Philippe Poulard | last post by:
I don't know if anybody already designed an URN scheme for XML; here is a proposal: I call it the "XML URN Scheme", or XUS. ========= URNs are logical names used to identify resources. XUS defines an URN Scheme for XML documents that works on a delegation model. As XUS (XML URN Scheme) is used exclusively for XML documents, it uses namespace URIs to identify this scheme and the delegate scheme.
1
1498
by: Robby Findler | last post by:
Dear all, I'm writing to let you know about the upcoming Scheme and Functional Programming workshop -- specifically that the submission deadline is June 9, about 2 months from now. The workshop will be held Portland Oregon on September 17, the day before ICFP. We look forward you your submissions!
14
2184
by: Paddy3118 | last post by:
This month there was/is a 1000+ long thread called: "merits of Lisp vs Python" In comp.lang.lisp. If you followed even parts of the thread, AND previously used only one of the languages AND (and this is the crucial bit), were persuaded to have a more positive view of the other language; (deep breath, this is a long, as well as grammatically incorrect sentence), THEN WHY NOT POST ON WHAT ARGUMENTS PERSUADED YOU.
0
2246
by: ajibits | last post by:
hi ppl For my application, I need to encode/decode the information in either of these two following coding schemes. Contents: Alpha tagging(name) of the associated dialling number. Coding:
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10144
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9997
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9937
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
3
3522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.