Thursday, April 17, 2014

#1 2012-12-28 08:15:47 am

danwan
Member
Registered: 2008-03-21
Posts: 128

UTF 16 to MAC linefeed ?

Trying to import in FMP12 an UTF-16 with UNIX LF plain text file through TextWrangler every LF converts to a CR and as such as a new record.

How to to avoid this?

Selecting the various paragraphs and asking TextWrangler to convert "\r" to "\n"  gives no results and FMP keeps separating the selection with CRs

Thanks for any assistance

Offline

 

#2 2012-12-28 11:31:07 am

DJ Bazzie Wazzie
Member
From: the Netherlands
Registered: 2004-10-20
Posts: 1758

Re: UTF 16 to MAC linefeed ?

Why using textwrangler?


Kind regards

You can chat here about AppleScript

Offline

 

#3 2012-12-28 12:32:49 pm

danwan
Member
Registered: 2008-03-21
Posts: 128

Re: UTF 16 to MAC linefeed ?

Thanks and Happy New Year

I use textWrangler as I import my data from my Samsung Phones. The application doing this returns text files. They all have pretty much the same format however if I want to import into Filemaker12 the SMS messages if in the message there are Carriage returns they will become New Records and to fix this is complex.

the files (all in UTF16) are as follow

timestamp (tab) from_to (tab) phone_Num (tab) SMS

so the last part is troublesome as explained previously,

I am not very skilled with Apple script however TextWrangler allows me to modify the various files much better than text edit, still I am unable to create an "import File" which will smoothly go to the FMP

Thanks

Last edited by danwan (2012-12-28 12:37:30 pm)

Offline

 

#4 2012-12-28 01:15:32 pm

McUsrII
Member
Registered: 2012-11-20
Posts: 2254
Website

Re: UTF 16 to MAC linefeed ?

Hello.

If you save the files with Unix Linefeeds in Text Wrangler, then you'll have to configure your FileMaker import if possible. You better read the documentation for what kind of UTF-16 Filemaker accepts and adjust accordingly in Text Wrangler, that is, if that is the issue. Big Endian / Small Endian, and Bom/NoBom. Text Wrangler can do it all.

Edit

If you don't succeed in making FileMaker keep the Linefeeds, then maybe you could just convert the linefeeds into return in TextWrangler?

Last edited by McUsrII (2012-12-28 01:29:17 pm)


Filed under: FileMaker, textwrangler

Offline

 

#5 2012-12-28 05:39:18 pm

DJ Bazzie Wazzie
Member
From: the Netherlands
Registered: 2004-10-20
Posts: 1758

Re: UTF 16 to MAC linefeed ?

I'm with McUsr but there are two more things I would try:

1) Check if fmp12 can handle text indicators. Then you should wrap the sms messages in double quotes and double quotes should be replaces with 2 double qoutes.
2) Replace the return in the sms message with a non printable character like a device control of form feed character and replace that back after import?

The problem you mention is not AppleScript related so we have to find a solution first that we can work out in AppleScript later.


Kind regards

You can chat here about AppleScript

Offline

 

#6 2013-01-02 02:24:00 pm

kerflooey
Member
Registered: 2011-07-07
Posts: 51

Re: UTF 16 to MAC linefeed ?

Filemaker wants a CR to indicate a new record. I would pre-process the text files to replace at least all LF (ASCII 10), VT (ASCII 11), and ASCII 29 (used to delimit repeating field values in FM) to other importable literal characters or strings such as "[[LF]]" which can then be substituted for in FM as desired.

Last edited by kerflooey (2013-01-02 02:30:53 pm)

Offline

 

Board footer

Powered by FluxBB

[ Generated in 0.028 seconds, 10 queries executed ]

RSS (new topics) RSS (active topics)