[postgis-users] Encoding problem UTF-8

Richard Greenwood richard.greenwood at gmail.com
Thu Dec 15 09:50:26 PST 2011


I have never imported a DWG directly into PostGIS but I am not
surprised. In CAD text is not usually an attribute stored in a table.
You might start a new thread as there may be others that could answer
your question.

Regards,
Rich

On Thu, Dec 15, 2011 at 9:59 AM, Bob Pawley <rjpawley at shaw.ca> wrote:
> Thanks Richard
>
> That imported the blocks and text as far as viewing is concerned.
>
> However, the text is part of the Linestring layer and not in the text column
> of the Postgresql table.
>
> Is this to be expected?
>
> Is there some way of identifying the text?
>
> Bob
>
> -----Original Message----- From: Richard Greenwood
> Sent: Wednesday, December 14, 2011 8:52 PM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] Encoding problem UTF-8
>
>
> Bob,
> Before running ogr2ogr try setting:
>  set PGCLIENTENCODING=LATIN1
>
> Rich
>
> On Wed, Dec 14, 2011 at 11:28 AM, Bob Pawley <rjpawley at shaw.ca> wrote:
>>
>> Hi
>>
>> I am attempting to import a dxf file to Postgis using ogr2ogr version 1.8
>> running on Win 7.
>>
>> I get errors “invalid byte sequence for encoding "UTF8": 0xfe” using the
>> following command in command prompt. Points and text are not being
>> imported.
>>
>> set DXF_INLINE_BLOCKS=false&set DXF_MERGE_BLOCK_GEOMETRIES=false&&ogr2ogr
>> --config DXF_ENCODING UTF-8 -f "PostgreSQL" PG:"host=localhost
>> user=postgres
>> dbname=IDW password=calgary0623" Water_Ex.dxf -nln Import_PID  -overwrite
>> -skipfailures
>>
>> During research of this problem I came upon a suggestion to check with the
>> Postgre list.
>>
>> Can anyone suggest a solution?
>>
>> Following are a few of the error messages.
>>
>> Bob
>>
>> LIST', '{1,1,1}', 0) RETURNING ogc_fid
>> ERROR 1: INSERT command for new feature failed.
>> ERROR:  invalid byte sequence for encoding "UTF8": 0xfe
>>
>> Command: INSERT INTO "import_pid" ("wkb_geometry" , "layer", "subclasses",
>> "exte
>> ndedentity", "entityhandle", "blockname", "blockscale", "blockangle")
>> VALUES
>> (Ge
>> omFromEWKT('SRID=-1;POINT (0.003291735334244 -0.065895915915561)'::TEXT) ,
>> 'MC-A
>> TT', 'AcDbEntity:AcDbBlockReference', '     4 tag_rev1 t      1
>> KEYTAG■C,10,0 RE
>> V_ID■C,10,0 REVISION■C,3,0 REVISED_BY■C,10,0 REVISED_ON■C,14,0
>> REV_TITLE■C,32,0
>> REV_BY_APP■C,16,0 APPROVEDBY■C,10,0 PENDING■C,1,0 PEND_MAIL■C,10,0',
>> '327A',
>> '_A
>> T_DIRLIST', '{1,1,1}', 0) RETURNING ogc_fid
>> ERROR 1: INSERT command for new feature failed.
>> ERROR:  invalid byte sequence for encoding "UTF8": 0xfe
>>
>> Command: INSERT INTO "import_pid" ("wkb_geometry" , "layer", "subclasses",
>> "exte
>> ndedentity", "entityhandle", "blockname", "blockscale", "blockangle")
>> VALUES
>> (Ge
>> omFromEWKT('SRID=-1;POINT (0.003291735334244 -0.065895915915561)'::TEXT) ,
>> 'MC-A
>> TT', 'AcDbEntity:AcDbBlockReference', '     4 tag_rev2 t      1
>> REV_ID■C,10,0 RE
>> V_DETAIL■C,50,0 REV_INT■N,3,0', '327B', '_AT_DIRLIST', '{1,1,1}', 0)
>> RETURNING o
>> gc_fid
>> ERROR 1: INSERT command for new feature failed.
>> ERROR:  invalid byte sequence for encoding "UTF8": 0xfe
>>
>>
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>
>
>
> --
> Richard Greenwood
> richard.greenwood at gmail.com
> www.greenwoodmap.com
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com



More information about the postgis-users mailing list