Global Mapper v25.0

how do I set Code page

GLOBAL_MAPPER_SCRIPT VERSION=1.00

IMPORT_SPATIAL_DB TYPE="POSTGIS" SDB_CONNECTION_NAME="conn_name" \
SDB_SERVER="000.000.000.0000" SDB_PORT="5432" SDB_DATABASE_NAME="dbname"\
SDB_USER_NAME="user" SDB_PASSWORD="user1"\
SDB_SAVE_USER_AND_PASSWORD="YES" SDB_USER_NAME="user"\
SDB_TABLE_NAME="public.dbname"

--here I import a table from a database

EDIT_VECTOR CREATE_VERTEX_POINTS=YES 

EDIT_VECTOR MOVE_TO_NEW_LAYER=YES NEW_LAYER_NAME="POINT" COMPARE_STR="ID=413" 
CALC_ATTR TYPE="SUBTRACT" NEW_ATTR="nr_p" SOURCE_ATTR="VTX_NUM" VALUE="1" 
EDIT_VECTOR DELETE_FEATURES=YES COMPARE_STR="nr_p=0" 

ATTR_TO_DELETE=<VTX_NUM>

--on this part from the imported table which has geomtry type line I extract points and delete the points
--that have vtx_num=0

UNLOAD_LAYER FILENAME="public.dbname (conn_name)"

--here I unload the lines and keep only the points


EXPORT_VECTOR TYPE="POSTGIS" SDB_CONNECTION_NAME="conn_name" \
SDB_SERVER="000.000.000.0000" SDB_PORT="5432" SDB_DATABASE_NAME="dbname"\
SDB_USER_NAME="user" SDB_PASSWORD="user1"\
SDB_SAVE_USER_AND_PASSWORD="YES" SDB_USER_NAME="user"\
SDB_TABLE_NAME=P413 SHAPE_TYPE="POINTS"


## where should I set the code page so that the POINT layer that I create would be imported in the postgis database in UTF8

Answers

  • bmg_bob
    bmg_bob Global Mapper Programmer
    edited May 2018
    Hello,

    When exporting to a PostGIS database, Global Mapper always encodes text data as UTF-8. 

    Cheers,
    Bob
  • adrian.diaconu
    adrian.diaconu Global Mapper User
    hi Bob,

    Thank you very much for your answer but in my case is not like this. Or maybe I am doing something wrong.

    I am working with Global Mapper and Qgis and I always have this issue with encoding.

    If I would like still to set the Code page maybe to some other char set let's say ANSI where should I place and how should I write it in the code above.

    Thank you very much!
    Adi