shapefile 编码错误问题解决 Wrong codepage of shapefile Warning 1: One or several characters couldn't be converted correctly from UTF-8 to ISO-8859-1.
linux下运行,因为大部分shapefile 文件,在使用时都没有指定字符集,所以qgis只能从环境变量中获取设置环境变量中获取SHAPE_ENCODING。
目前唯一的解决办法就是设置环境变量
$ SHAPE_ENCODING=UTF-8
$ export SHAPE_ENCODING
$ qgis
I insist that this is a QGIS issue.
GDAL 1.9.0 (and newer) is trying to interpret the encoding setting from the shape file itself. When creating a new shape file “ENCODING” should be passed as an attribute, which, obviously, is not done.
Calling qgis from terminal allows two track down an warning messages. Saving non-Latin characters in a shape files generates following warning message: “Warning 1: One or several characters couldn't be converted correctly from UTF-8 to ISO-8859-1.
This warning will not be emitted anymore”.
On the other hand, most of the shape files used by users are without character encoding byte. So QGIS has to operate with environmental variable “SHAPE_ENCODING”. At present the only solution is to use the same character coding for the given QGIS session, e.g.:
SHAPE_ENCODING=UTF-8 export SHAPE_ENCODING qgis
The example above allows to create and edit shape files with UTF-8 as a character encoding (example for Linux users, Windows users must use “SET SHAPE_ENCODING=UTF-8”).
------------------------------------------------
Excerpt from
http://trac.osgeo.org/gdal/wiki/ConfigOptions
In C/C++ configuration switches can be set programmatically like this:
#include "cpl_conv.h"
...
CPLSetConfigOption( "GDAL_CACHEMAX", "64" );
Normally a configuration option applies to all threads active in a program, but they can be limited to only the current thread this way:
CPLSetThreadLocalConfigOption( "GDAL_CACHEMAX", "64" );
由 zirneklitis - 更新于 一年以上 之前
The Linux example above should be as follows:
$ SHAPE_ENCODING=UTF-8
$ export SHAPE_ENCODING
$ qgis
shapefile 编码错误问题解决 Wrong codepage of shapefile Warning 1: One or several characters couldn't be converted correctly from UTF-8 to ISO-8859-1.的更多相关文章
- Python文件读取编码错误问题解决之(PyCharm开发工具默认设置的坑。。。)
刚接触Python学习,正准备做个爬虫的例子,谁知道代码一开始就遇到了一个大坑,狂汗啊. 问题是这样的:我通过代码爬取了博客园首页的HTML代码并存入到blog.txt文件当中,然后准备读取出来之后进 ...
- windows上使用pip下载东西时报编码错误问题解决方法
原因是pip安装python包会加载我的用户目录,我的用户目录恰好是中文的,ascii不能编码.解决办法是: python目录 Python27\Lib\site-packages 建一个文件site ...
- ruby -- 问题解决(四)编码错误导致无法显示(2)
从数据库中取得数据显示时报 incompatible character encodings: GBK and ASCII-8BIT或 incompatible character encodings ...
- ruby -- 问题解决(三)编码错误导致无法显示(1)
从数据库中取得数据显示时报 incompatible character encodings: GBK and ASCII-8BIT 或 incompatible character encoding ...
- 火狐firefox提示“内容编码错误 无法显示您尝试查看的页面,因为它使用了无效或者不支持的压缩格式。”
火狐firefox浏览器打开网也是时提示“内容编码错误 无法显示您尝试查看的页面,因为它使用了无效或者不支持的压缩格式.” 今早一来打开用PHPCMS做的网站时就提示这个错误,用其他浏览器打开提示的是 ...
- 记一次python编码错误
摘要: 断断续续写python一段时间了,让我说python最令我头疼的问题,莫过于编码问题.最近做大论文,使用python再次出现编码报错.错误如下: "UnicodeEncodeErro ...
- windows下编译java源文件的编码错误
import java.util.Arrays;public class ArrayAsAReference{ public static void main(String[] args) { int ...
- python编码错误
初学python,遇到的最难忘的坑没有之一.这个问题起码困扰了我一周.在我写了一段代码之后经常遇见这样的报错. 本质原因是我用的python2,在编码流派中python2是比较奇葩的一派,不随大流.所 ...
- linux 关于Apache默认编码错误 导致网站乱码的解决方案
Apache默认编码UTF-8在解析A网站的时候没有任何问题,当运行B网站时出现的"蝌蚪文"乱码问题 最近经常有同学在使用LAMP/WAMP时,遇到这样的编码错误问题: A网站 ...
随机推荐
- jQuery的fancybox插件
- java注解入门(含源码下载)
注解(Annotation)是从jdk1.5开始增加的特性.学习注解能够读懂框架的代码:让编程更加简洁,代码更加清晰. 注解概念:java提供了一种原程序中的元素关联任何信息和任何元数据的途径和方法. ...
- 基于百度地图api + AngularJS 的入门地图
转载请注明地址:http://www.cnblogs.com/enzozo/p/4368081.html 简介: 此入门地图为简易的“广州大学城”公交寻路地图,采用很少量的AngularJS进行inp ...
- LNMP安装包sh脚本
Xshell 5 (Build 0719) Copyright (c) 2002-2015 NetSarang Computer, Inc. All rights reserved. Type `he ...
- 删除缓存内容----unrecognized selector sent to instance
这条错误主要还得看unrecognized前面,,我的时[NSNumber-length...]其实是变量类型错误.. 无法识别选择器发送实例,,本来意思就是你的controllerview找不到视图 ...
- QT无标题窗口在任务栏显示关闭(增加系统菜单)
在对话框中使用了如下代码: setWindowFlags(Qt::FramelessWindowHint); 在任务栏上右键点击程序,不会弹出菜单,解决办法,使用下面代码: setWindowFlag ...
- haproxy 访问www.zjdev.com 自动跳转到appserver_8001 对应的nginx
# # acl zjdev_7_req hdr_beg(host) -i www.zjdev.com # use_backend appserver_8001 if zjdev_7_req
- Redhat 5.8系统安装R语言作Arima模型预测
请见Github博客:http://wuxichen.github.io/Myblog/timeseries/2014/09/02/RJavaonLinux.html
- VS2010/MFC对话框一:创建对话框模板和修改对话框属性
创建对话框主要分两大步: 第一,创建对话框资源,主要包括创建新的对话框模板.设置对话框属性和为对话框添加各种控件: 第二,生成对话框类,主要包括新建对话框类.添加控件变量和控件的消息处理函数等. 创建 ...
- 正确的lnamp支持SSI的方法!即支持SHTML和include调用!
正确的lnamp支持SSI的方法!即支持SHTML和include调用! 个地方:一个是apache和nginx里的conf文件 第一步:修改apache里的httpd.conf文件 查找:AddTy ...