mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Replace unicode by Unicode
This commit is contained in:
parent
c301369ebe
commit
a56f928f71
@ -1448,7 +1448,7 @@ DOT_NUM_THREADS = 0
|
||||
|
||||
# By default doxygen will write a font called FreeSans.ttf to the output
|
||||
# directory and reference it in all dot files that doxygen generates. This
|
||||
# font does not include all possible unicode characters however, so when you need
|
||||
# font does not include all possible Unicode characters however, so when you need
|
||||
# these (or just want a differently looking font) you can specify the font name
|
||||
# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
|
||||
# which can be done by putting it in a standard location or by setting the
|
||||
|
@ -89,7 +89,7 @@ class BaseTableModel(QAbstractTableModel):
|
||||
# too much data to display, elide the string
|
||||
val = val[:300]
|
||||
try:
|
||||
return str(val) # convert to unicode
|
||||
return str(val) # convert to Unicode
|
||||
except UnicodeDecodeError:
|
||||
return str(val, 'utf-8', 'replace') # convert from utf8 and replace errors (if any)
|
||||
|
||||
|
@ -133,7 +133,7 @@ class Eliminate(GeoAlgorithm):
|
||||
y = str(comparisonvalue)
|
||||
except ValueError:
|
||||
selectionError = True
|
||||
msg = self.tr('Cannot convert "%s" to unicode' % str(comparisonvalue))
|
||||
msg = self.tr('Cannot convert "%s" to Unicode' % str(comparisonvalue))
|
||||
elif selectType == QVariant.Date:
|
||||
# date
|
||||
dateAndFormat = comparisonvalue.split(' ')
|
||||
|
@ -23,7 +23,7 @@ and recognizes all major notations, prefixes (ver. and version), delimiters
|
||||
|
||||
Usage: compareVersions(version1, version2)
|
||||
|
||||
The function accepts arguments of any type convertable to unicode string
|
||||
The function accepts arguments of any type convertable to Unicode string
|
||||
and returns integer value:
|
||||
0 - the versions are equal
|
||||
1 - version 1 is higher
|
||||
@ -31,7 +31,7 @@ and returns integer value:
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
HOW DOES IT WORK...
|
||||
First, both arguments are converted to uppercase unicode and stripped of
|
||||
First, both arguments are converted to uppercase Unicode and stripped of
|
||||
'VERSION' or 'VER.' prefix. Then they are chopped into a list of particular
|
||||
numeric and alphabetic elements. The dots, dashes and underlines are recognized
|
||||
as delimiters. Also numbers and non numbers are separated. See example below:
|
||||
|
@ -269,7 +269,7 @@ QgsPostgresConn::QgsPostgresConn( const QString& conninfo, bool readOnly, bool s
|
||||
return;
|
||||
}
|
||||
|
||||
//set client encoding to unicode because QString uses UTF-8 anyway
|
||||
//set client encoding to Unicode because QString uses UTF-8 anyway
|
||||
QgsDebugMsg( "setting client encoding to UNICODE" );
|
||||
int errcode = PQsetClientEncoding( mConn, QStringLiteral( "UNICODE" ).toLocal8Bit() );
|
||||
if ( errcode == 0 )
|
||||
|
@ -546,7 +546,7 @@ QString QgsPythonUtilsImpl::PyObjectToQString( PyObject* obj )
|
||||
}
|
||||
|
||||
// it's some other type of object:
|
||||
// convert object to unicode string (equivalent to calling unicode(obj) )
|
||||
// convert object to Unicode string (equivalent to calling unicode(obj) )
|
||||
PyObject* obj_uni = PyObject_Unicode( obj ); // obj_uni is new reference
|
||||
if ( obj_uni )
|
||||
{
|
||||
@ -564,7 +564,7 @@ QString QgsPythonUtilsImpl::PyObjectToQString( PyObject* obj )
|
||||
}
|
||||
#endif
|
||||
|
||||
// if conversion to unicode failed, try to convert it to classic string, i.e. str(obj)
|
||||
// if conversion to Unicode failed, try to convert it to classic string, i.e. str(obj)
|
||||
PyObject* obj_str = PyObject_Str( obj ); // new reference
|
||||
if ( obj_str )
|
||||
{
|
||||
@ -573,7 +573,7 @@ QString QgsPythonUtilsImpl::PyObjectToQString( PyObject* obj )
|
||||
return result;
|
||||
}
|
||||
|
||||
// some problem with conversion to unicode string
|
||||
// some problem with conversion to Unicode string
|
||||
QgsDebugMsg( "unable to convert PyObject to a QString!" );
|
||||
return QStringLiteral( "(qgis error)" );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user