Re: text characters in blob or text to document

2018-10-30 Thread John DeSoi via 4D_Tech

> On Oct 30, 2018, at 2:24 PM, Charles Miller via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> OK I will try and explain. I qwas working at a customer who has code that
> uses send packet. This is really old code and I do not think they have ever
> used USE CHARACTER SET.

So that is likely generating Latin-1/ISO-8859-1 especially if the old version 
does not have unicode mode enabled.


> We are upgrading to v16, so I tried filling a text
> variable and with the data and then doing a text top document. This di
> not work  I then tried text to blob and then blob to document. This did not
> work. In both cases, I used UTF8 text without length which also did not
> work. Does this make ity clearer?

UTF-8 is not iso-8859-1, so I would not expect it to work correctly. For the 
blob commands you need to use "Mac text without length" option. For the 
text/document commands use the "ISO-8859-1" character set.

John DeSoi, Ph.D.

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: text characters in blob or text to document

2018-10-30 Thread Charles Miller via 4D_Tech
OK I will try and explain. I qwas working at a customer who has code that
uses send packet. This is really old code and I do not think they have ever
used USE CHARACTER SET. We are upgrading to v16, so I tried filling a text
variable and with the data and then doing a text top document. This di
not work  I then tried text to blob and then blob to document. This did not
work. In both cases, I used UTF8 text without length which also did not
work. Does this make ity clearer?
Regards

Chuck

On Tue, Oct 30, 2018 at 1:09 PM John DeSoi via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> Not sure I'm following exactly what you are doing - difficult to know
> without seeing the commands and parameters. TEXT TO BLOB and Blob to text
> both allow you to specify the character set.
>
> If you are using SEND PACKET with a blob you created using TEXT TO BLOB,
> there should be no problem converting it back via DOCUMENT TO BLOB and then
> Blob to text. If you are using text with SEND PACKET, you have to be sure
> to USE CHARACTER SET.
>
> John DeSoi, Ph.D.
>
>
> > On Oct 30, 2018, at 11:46 AM, Charles Miller via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >
> > Thanks I kind of figured that out, but when you got text to blob, you can
> > not choose character set. According to docs. see below. How would one
> > solved this problem. I wiuld guess continues to use send packet is omne
> > solution. Are there others.
>
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **



-- 
-
 Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
 Informed Solutions, Inc.
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D, Sybase & SQL Server connectivity
  http://www.informed-solutions.com
-
This message and any attached documents contain information which may be
confidential, subject to privilege or exempt from disclosure under
applicable law.  These materials are intended only for the use of the
intended recipient. If you are not the intended recipient of this
transmission, you are hereby notified that any distribution, disclosure,
printing, copying, storage, modification or the taking of any action in
reliance upon this transmission is strictly prohibited.  Delivery of this
message to any person other than the intended recipient shall not
compromise or waive such confidentiality, privilege or exemption
from disclosure as to this communication.
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: text characters in blob or text to document

2018-10-30 Thread John DeSoi via 4D_Tech
Not sure I'm following exactly what you are doing - difficult to know without 
seeing the commands and parameters. TEXT TO BLOB and Blob to text both allow 
you to specify the character set.

If you are using SEND PACKET with a blob you created using TEXT TO BLOB, there 
should be no problem converting it back via DOCUMENT TO BLOB and then Blob to 
text. If you are using text with SEND PACKET, you have to be sure to USE 
CHARACTER SET.

John DeSoi, Ph.D.


> On Oct 30, 2018, at 11:46 AM, Charles Miller via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Thanks I kind of figured that out, but when you got text to blob, you can
> not choose character set. According to docs. see below. How would one
> solved this problem. I wiuld guess continues to use send packet is omne
> solution. Are there others.

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: text characters in blob or text to document

2018-10-30 Thread Charles Miller via 4D_Tech
Thanks I kind of figured that out, but when you got text to blob, you can
not choose character set. According to docs. see below. How would one
solved this problem. I wiuld guess continues to use send packet is omne
solution. Are there others.

Regards

Chuck

Text without length The text is composed only of its characters.
*UTF8* "" --> No data
"Café" --> $43 61 66 C3 A9
*Mac* "" --> No data
"Café" --> $43 61 66 8E

On Tue, Oct 30, 2018 at 12:40 PM John DeSoi via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> The problem is likely with TEXT TO DOCUMENT/Document to text. These have
> strange defaults, so you have to be very careful about the parameters.
>
> TEXT TO DOCUMENT defaults to UTF-8 and inserts a BOM (which I think is a
> bug). So you can't read it using DOCUMENT TO BLOB and covert to UTF-8 text
> without deleting the BOM first.
>
> Document to text assumes MacRoman/ANSI if the document does not have a BOM
> and you don't specify the character set. So if you are saving UTF-8 with a
> blob, you need to be sure to specify the character set for Document to text
> to interpret it correctly.
>
> John DeSoi, Ph.D.
>
>
> > On Oct 30, 2018, at 11:09 AM, Charles Miller via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >
> > When I use text to blob with utf 8
> > conversion and then blob to document or text to document the bullets get
> > converted to strange looking question marks. Any idea how to solvce this
> > problem. I know it has something to do with character set but UTF8 text
> > without length does not work.
>
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **



-- 
-
 Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
 Informed Solutions, Inc.
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D, Sybase & SQL Server connectivity
  http://www.informed-solutions.com
-
This message and any attached documents contain information which may be
confidential, subject to privilege or exempt from disclosure under
applicable law.  These materials are intended only for the use of the
intended recipient. If you are not the intended recipient of this
transmission, you are hereby notified that any distribution, disclosure,
printing, copying, storage, modification or the taking of any action in
reliance upon this transmission is strictly prohibited.  Delivery of this
message to any person other than the intended recipient shall not
compromise or waive such confidentiality, privilege or exemption
from disclosure as to this communication.
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: text characters in blob or text to document

2018-10-30 Thread John DeSoi via 4D_Tech
The problem is likely with TEXT TO DOCUMENT/Document to text. These have 
strange defaults, so you have to be very careful about the parameters.

TEXT TO DOCUMENT defaults to UTF-8 and inserts a BOM (which I think is a bug). 
So you can't read it using DOCUMENT TO BLOB and covert to UTF-8 text without 
deleting the BOM first.

Document to text assumes MacRoman/ANSI if the document does not have a BOM and 
you don't specify the character set. So if you are saving UTF-8 with a blob, 
you need to be sure to specify the character set for Document to text to 
interpret it correctly.

John DeSoi, Ph.D.


> On Oct 30, 2018, at 11:09 AM, Charles Miller via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> When I use text to blob with utf 8
> conversion and then blob to document or text to document the bullets get
> converted to strange looking question marks. Any idea how to solvce this
> problem. I know it has something to do with character set but UTF8 text
> without length does not work.

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

text characters in blob or text to document

2018-10-30 Thread Charles Miller via 4D_Tech
Hi All,

Environment v16 on Mac
I have created document with bullets in text of output. When I use send
packet the result is as expected. When I use text to blob with utf 8
conversion and then blob to document or text to document the bullets get
converted to strange looking question marks. Any idea how to solvce this
problem. I know it has something to do with character set but UTF8 text
without length does not work.

Thanks and regards

Chuck

-- 
-
 Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
 Informed Solutions, Inc.
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D, Sybase & SQL Server connectivity
  http://www.informed-solutions.com
-
This message and any attached documents contain information which may be
confidential, subject to privilege or exempt from disclosure under
applicable law.  These materials are intended only for the use of the
intended recipient. If you are not the intended recipient of this
transmission, you are hereby notified that any distribution, disclosure,
printing, copying, storage, modification or the taking of any action in
reliance upon this transmission is strictly prohibited.  Delivery of this
message to any person other than the intended recipient shall not
compromise or waive such confidentiality, privilege or exemption
from disclosure as to this communication.
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**