[Moin-user] Re: Escape for semicolon

Mike Rovner mike at nospam.com
Thu Sep 9 13:41:09 EDT 2004


You can use my version of CSV.py. It's add a parameter -<col|separator> to
call CSV
like in
{{{#!CSV -| -3
...
}}}
means use | as separator and exclude column 3 from input.

HTH,
Mike

Tiago R. Mello wrote:
> Hi there!
>
>     How can I escape the semicolon in CSV mode?
>
>     Ex:
>
>     1;FOO;BAR;3
>     and it show:
>     1 | FOO | BAR | 3
>
>     But I want:
>
>     1;"FOO;BAR";3
>     1 | FOO;BAR | 3
>
>     I try with "", \\, \, '' but it didn't work.
>
>     Any help?
>
>     Did it have value parameters? Like, CVS -index for specify a
>     separator, escape char or something...
>
>     Thank you
>
> []'s
>
> Tiago R. Mello
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your judgement
> on who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php


begin 666 CSV.py
M(R M*BT at 8V]D:6YG.B!I<V\M.#@U.2TQ("TJ+0HB(B(*(" @($UO:6Y-;VEN
M("T at 4')O8V5S<V]R(&9O<B!#4U8 at 9&%T80H*(" @($!C;W!Y<FEG:'0Z(#(P
M,#(@8GD at 2OQR9V5N($AE<FUA;FX@/&IH0'=E8BYD93X*(" @($!L:6-E;G-E
M.B!'3E4 at 1U!,+"!S964 at 0T]064E.1R!F;W(@9&5T86EL<RX*(B(B"@I$97!E
M;F1E;F-I97,@/2!;70H*9&5F('!R;V-E<W,H<F5Q=65S="P at 9F]R;6%T=&5R
M+"!L:6YE<RDZ"B @(" C('!A<G-E(&)A;F=P871H(&9O<B!A<F=U;65N=',*
M(" @(&5X8VQU9&4@/2!;70H@(" @<V5P87)A=&]R/2<[)PH@(" @9F]R(&%R
M9R!I;B!L:6YE<ULP72YS<&QI="@I6S$Z73H*(" @(" @("!I9B!A<F=;,%T@
M/3T@)RTG. at H@(" @(" @(" @("!T<GDZ"B @(" @(" @(" @(" @("!I9'@@
M/2!I;G0H87)G6S$Z72D*(" @(" @(" @(" @97AC97!T(%9A;'5E17)R;W(Z
M"B @(" @(" @(" @(" @("!P87-S"B @(" @(" @(" @(&5L<V4Z"B @(" @
M(" @(" @(" @("!E>&-L=61E+F%P<&5N9"AI9'@M,2D*"65L<V4Z"B @(" )
M(" @('-E<&%R871O<CUA<F<*"B @(" C(')E;6]V92!B86YG('!A=&@L(&-R
M96%T92!O=71P=70@;&ES= H@(" @9&5L(&QI;F5S6S!="B @("!O=71P=70@
M/2!;70H*(" @(&EF(&QI;F5S6S!=. at H@(" @(" @(", at 97AP96-T(&-O;'5M
M;B!H96%D97)S(&EN(&9I<G-T(&QI;F4*(" @(" @("!F:7)S=" ](#$*(" @
M(&5L<V4Z"B @(" @(" @(R!E;7!T>2!F:7)S="!L:6YE+"!N;R!B;VQD(&AE
M861E<G,*(" @(" @("!F:7)S=" ](# *(" @(" @("!D96P@;&EN97-;,%T*
M"B @("!O=71P=70N87!P96YD*&9O<FUA='1E<BYT86)L92 at Q*2D*(" @(&9O
M<B!L:6YE(&EN(&QI;F5S. at H@(" @(" @(&]U='!U="YA<'!E;F0H9F]R;6%T
M=&5R+G1A8FQE7W)O=R at Q*2D*(" @(" @("!C96QL<R ](&QI;F4N<W!L:70H
M<V5P87)A=&]R*0H@(" @(" @(&9O<B!I9'@@:6X@<F%N9V4H;&5N*&-E;&QS
M*2DZ"B @(" @(" @(" @(&EF(&ED>"!I;B!E>&-L=61E.B!C;VYT:6YU90H@
M(" @(" @(" @("!O=71P=70N87!P96YD*&9O<FUA='1E<BYT86)L95]C96QL
M*#$I*0H@(" @(" @(" @("!I9B!F:7)S=#H@;W5T<'5T+F%P<&5N9"AF;W)M
M871T97(N<W1R;VYG*#$I*0H@(" @(" @(" @("!O=71P=70N87!P96YD*&9O
M<FUA='1E<BYT97AT*&-E;&QS6VED>%TI*0H@(" @(" @(" @("!I9B!F:7)S
M=#H@;W5T<'5T+F%P<&5N9"AF;W)M871T97(N<W1R;VYG*# I*0H@(" @(" @
M(" @("!O=71P=70N87!P96YD*&9O<FUA='1E<BYT86)L95]C96QL*# I*0H@
M(" @(" @(&]U='!U="YA<'!E;F0H9F]R;6%T=&5R+G1A8FQE7W)O=R at P*2D*
M(" @(" @("!F:7)S=" ](# *(" @(&]U='!U="YA<'!E;F0H9F]R;6%T=&5R
M+G1A8FQE*# I*0H*(" @(')E<75E<W0N=W)I=&4H)R<N:F]I;BAO=71P=70I
#*0H*
`
end






More information about the Moin-user mailing list