export probs

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

export probs

Postby Odysseus » Tue Aug 03, 2004 10:18 am

Hi guys,

problem: I've written a conversion tool for my servoy data to sqlite. Works perfectly (well.....)
I can export an sql file that contains all instructions to generate an sqlite file. There is one problem with the text qualifiers.
I started using ' as text qualifier but than hit the problem that in some languages ' is used within text, so I switched to " as a text qualifier, enforcing quotes to be single quote. That worked OK until I wanted to export some html formatted code. This html uses "" in some place size="3" or font="tahoma". This again messes things up. Since for html there is no need to use double quotes, single quotes render as well, here's my question
Is it possible to create a setting where you indicate that in html constants are in single quotes or do you see another solution ?

TIA
Odysseus

Citizen of Old Europe
Odysseus
 
Posts: 205
Joined: Wed Sep 10, 2003 9:34 pm
Location: Belgium

Postby Jan Aleman » Tue Aug 03, 2004 11:09 am

the best is to escape the single quotes you find in text.
By using two single quotes you escape it for SQL
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth

Postby Odysseus » Tue Aug 03, 2004 1:52 pm

the single quotes are not the problem (anymore).

The problem lies in exporting an html area where constant values are double quoted. What I was looking for is a means of having the html area using single quotes in stead of the double quotes that are used by default.
Those double quotes in my opinion should be single quotes by default or as some parameter in preferences

TIA
Odysseus

Citizen of Old Europe
Odysseus
 
Posts: 205
Joined: Wed Sep 10, 2003 9:34 pm
Location: Belgium

Postby Jan Blok » Wed Aug 04, 2004 12:05 pm

Double qoutes are in the HTML spec, so they cannot be changed, using single qoutes en escaping single qoutes if found in the text is the most easy option.
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 30 guests

cron