Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #8524 > unrolled thread
| Started by | moshe attia <attiamx@gmail.com> |
|---|---|
| First post | 2015-10-16 08:35 -0700 |
| Last post | 2015-10-21 17:00 +0200 |
| Articles | 10 — 5 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
create txt file with utf-8 moshe attia <attiamx@gmail.com> - 2015-10-16 08:35 -0700
Re: create txt file with utf-8 D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2015-10-16 20:05 +0200
Re: create txt file with utf-8 Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2015-10-16 20:50 +0200
Re: create txt file with utf-8 D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2015-10-19 11:54 +0200
Re: create txt file with utf-8 Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2015-10-19 14:01 +0200
Re: create txt file with utf-8 D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2015-10-20 19:59 +0200
Re: create txt file with utf-8 Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> - 2015-10-20 21:52 +0200
Re: create txt file with utf-8 "Uwe Heyer" <uwe.heyer@aristik.de> - 2015-10-16 20:18 +0000
Re: create txt file with utf-8 moshe attia <attiamx@gmail.com> - 2015-10-17 13:48 -0700
Re: create txt file with utf-8 "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> - 2015-10-21 17:00 +0200
| From | moshe attia <attiamx@gmail.com> |
|---|---|
| Date | 2015-10-16 08:35 -0700 |
| Subject | create txt file with utf-8 |
| Message-ID | <aa3c9200-dde0-4184-b8ab-fcb7310dc076@googlegroups.com> |
hi it create txt file and write the data in the file i need to write the file at utf-8 format . the project dump dbf file to svc and import the svc to mysql . when i import the file i recive at varchar ????????? moshe
[toc] | [next] | [standalone]
| From | D.J.W. van Kooten <vankooten@removethis.ic2.com> |
|---|---|
| Date | 2015-10-16 20:05 +0200 |
| Message-ID | <60f22bpek7gtgbe4m1in4pbsofmnpadmj7@4ax.com> |
| In reply to | #8524 |
On Fri, 16 Oct 2015 08:35:15 -0700 (PDT), moshe attia <attiamx@gmail.com> wrote: Hello Moshe, >it create txt file >and write the data in the file >i need to write the file at utf-8 format We are building a website with codesnippets: codesnippets.ic2.com I think what you need is one of these snippets: http://www.ic2.com/codesnippets/utf-conversion/?preview=true&preview_id=5795&preview_nonce=ade0d25b51 PS: anyone with interesting codesnippets, please post a few. Dick
[toc] | [prev] | [next] | [standalone]
| From | Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> |
|---|---|
| Date | 2015-10-16 20:50 +0200 |
| Message-ID | <jih22b5s8jbs82lgqhl16kfmkoj6mnmsn6@4ax.com> |
| In reply to | #8525 |
Dick, just had a look at Stringbuilder snippet by Phil - at least on FF41 the code seems to have lots of paragraphs instead of line breaks. Have a look at the html-source <shudder> Karl >On Fri, 16 Oct 2015 08:35:15 -0700 (PDT), moshe attia ><attiamx@gmail.com> wrote: > >Hello Moshe, > >>it create txt file >>and write the data in the file >>i need to write the file at utf-8 format > > >We are building a website with codesnippets: > >codesnippets.ic2.com > >I think what you need is one of these snippets: > >http://www.ic2.com/codesnippets/utf-conversion/?preview=true&preview_id=5795&preview_nonce=ade0d25b51 > >PS: anyone with interesting codesnippets, please post a few. > >Dick
[toc] | [prev] | [next] | [standalone]
| From | D.J.W. van Kooten <vankooten@removethis.ic2.com> |
|---|---|
| Date | 2015-10-19 11:54 +0200 |
| Message-ID | <u6f92b9lrj3etkn5af8hvoocpfk5pmms9g@4ax.com> |
| In reply to | #8526 |
On Fri, 16 Oct 2015 20:50:41 +0200, Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> wrote: Hello Karl, >just had a look at Stringbuilder snippet by Phil - at least on FF41 >the code seems to have lots of paragraphs instead of line breaks. >Have a look at the html-source <shudder> The biggest challenge here is to keep the colours as you see them in the editor of the language. Saving as RTF and getting it into Wordpress usually works. We'll have a look at this specific snippet; the RTF sent by Phil seems ok. We're still looking for a more suitable Wordpress plugin or control which allows us to paste RTF 1:1. Dick
[toc] | [prev] | [next] | [standalone]
| From | Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> |
|---|---|
| Date | 2015-10-19 14:01 +0200 |
| Message-ID | <c8m92b1kco6m8940su319mhvif3eij7iej@4ax.com> |
| In reply to | #8533 |
Dick, don't care for colours, being colour-blind has it's advantages ;-) What i'd think better is simply keeping lines intact. If someone wants to use the code, usually it's a copy and paste into the favourite editor anyway, then (in VIDE a CTRL-Shift-I) and formatting and colouring is done. Karl >On Fri, 16 Oct 2015 20:50:41 +0200, Karl Faller ><mail_withoutthat_@_drei-f_andthat_.de> wrote: > >Hello Karl, > >>just had a look at Stringbuilder snippet by Phil - at least on FF41 >>the code seems to have lots of paragraphs instead of line breaks. >>Have a look at the html-source <shudder> > > >The biggest challenge here is to keep the colours as you see them in >the editor of the language. Saving as RTF and getting it into >Wordpress usually works. We'll have a look at this specific snippet; >the RTF sent by Phil seems ok. > >We're still looking for a more suitable Wordpress plugin or control >which allows us to paste RTF 1:1. > >Dick
[toc] | [prev] | [next] | [standalone]
| From | D.J.W. van Kooten <vankooten@removethis.ic2.com> |
|---|---|
| Date | 2015-10-20 19:59 +0200 |
| Message-ID | <e10d2btgd7qurmc9cffncb96hh761a1hnp@4ax.com> |
| In reply to | #8534 |
On Mon, 19 Oct 2015 14:01:51 +0200, Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> wrote: Hello Karl, >What i'd think better is simply keeping lines intact. Sure - it used to be that way and I was told that a Wordpress update created the mess. This and several other snippets have been restored to how it originally looked. Thanks for drawing this to our attention. I plan to extend this site the next few weeks. As written, anyone with nice code snippets please post a few or mail them (in RTF Word format or anything else which retians the colours). We'll do the rest. Dick
[toc] | [prev] | [next] | [standalone]
| From | Karl Faller <mail_withoutthat_@_drei-f_andthat_.de> |
|---|---|
| Date | 2015-10-20 21:52 +0200 |
| Message-ID | <er6d2bhj7eakm1vp79astsp698gr5s5fh1@4ax.com> |
| In reply to | #8539 |
Dick, > This and several other snippets have been restored >to how it originally looked. much better ;-) Thx Karl
[toc] | [prev] | [next] | [standalone]
| From | "Uwe Heyer" <uwe.heyer@aristik.de> |
|---|---|
| Date | 2015-10-16 20:18 +0000 |
| Message-ID | <d8d4d4FqgidU1@mid.individual.net> |
| In reply to | #8524 |
moshe attia wrote:
> hi
> it create txt file
> and write the data in the file
> i need to write the file at utf-8 format
>
> .
> the project dump dbf file to svc
> and import the svc to mysql .
>
> when i import the file i recive at varchar ?????????
>
>
> moshe
--
Hi moshe,
you need a convert to wide_char first
MultiByteToWideChar(CP_ACP, ....)
second, convert above result to multi_byte
WideCharToMultiByte(CP_UTF8, ...)
first of both calls is the compute of needed spaces
see below (an example in Power Basic)
' Konvertiert ANSI nach UTF-8
FUNCTION PBAnsiToUtf8(BYVAL sString AS STRING) EXPORT AS STRING
LOCAL sBuffer AS STRING
LOCAL nLength AS LONG
nLength = MultiByteToWideChar(%CP_ACP, 0, BYVAL STRPTR(sString),
-1, BYVAL 0, 0)
sBuffer = NUL$(nLength * 2)
MultiByteToWideChar(%CP_ACP, 0, BYVAL STRPTR(sString), -1, BYVAL
STRPTR(sBuffer), nLength)
nLength = WideCharToMultiByte(%CP_UTF8, 0, BYVAL STRPTR(sBuffer),
-1, BYVAL 0, 0, BYVAL (0), BYVAL (0))
sString = NUL$(nLength)
WideCharToMultiByte(%CP_UTF8, 0, BYVAL STRPTR(sBuffer), -1, BYVAL
STRPTR(sString), nLength, BYVAL (0), BYVAL (0))
FUNCTION = LEFT$(sString, LEN(sString) - 1)
END FUNCTION
Ahoj
-Uwe
[toc] | [prev] | [next] | [standalone]
| From | moshe attia <attiamx@gmail.com> |
|---|---|
| Date | 2015-10-17 13:48 -0700 |
| Message-ID | <4fb51ece-68cb-4abd-84c6-40c3efcf6db6@googlegroups.com> |
| In reply to | #8524 |
On Friday, October 16, 2015 at 3:35:17 PM UTC, moshe attia wrote: > hi > it create txt file > and write the data in the file > i need to write the file at utf-8 format > > . > the project dump dbf file to svc > and import the svc to mysql . > > when i import the file i recive at varchar ????????? > > i try the fun but many err i working with vo2.5 > moshe
[toc] | [prev] | [next] | [standalone]
| From | "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> |
|---|---|
| Date | 2015-10-21 17:00 +0200 |
| Message-ID | <n08961$pql$1@dont-email.me> |
| In reply to | #8531 |
[Multipart message — attachments visible in raw view] — view raw
Hi Moshe, you should try with the function attached transforming your ANSI string cUTF8 := ConvertUnicodeString(cAnsi, #AnsiToCodepage, 65001, nil, nil) and then write this string to a file. There may be some parts that cannot be compiled but that are not used for you. Arne Ortlinghaus ACS Data Systems "moshe attia" <attiamx@gmail.com> schrieb im Newsbeitrag news:4fb51ece-68cb-4abd-84c6-40c3efcf6db6@googlegroups.com... > On Friday, October 16, 2015 at 3:35:17 PM UTC, moshe attia wrote: >> hi >> it create txt file >> and write the data in the file >> i need to write the file at utf-8 format >> >> . >> the project dump dbf file to svc >> and import the svc to mysql . >> >> when i import the file i recive at varchar ????????? >> >> > > i try the fun but many err i working with vo2.5 >> moshe >
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web