Skip to content

Commit

Permalink
Replace unicode by Unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ committed Dec 29, 2016
1 parent c301369 commit a56f928
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cmake_templates/Doxyfile.in
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/data_model.py
Expand Up @@ -89,7 +89,7 @@ def data(self, index, role):
# 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)

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/Eliminate.py
Expand Up @@ -133,7 +133,7 @@ def processAlgorithm(self, progress):
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(' ')
Expand Down
4 changes: 2 additions & 2 deletions python/pyplugin_installer/version_compare.py
Expand Up @@ -23,15 +23,15 @@
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
2 - version 2 is higher
-----------------------------------------------------------------------------
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:
Expand Down
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresconn.cpp
Expand Up @@ -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 )
Expand Down
6 changes: 3 additions & 3 deletions src/python/qgspythonutilsimpl.cpp
Expand Up @@ -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 )
{
Expand All @@ -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 )
{
Expand All @@ -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)" );
}
Expand Down

0 comments on commit a56f928

Please sign in to comment.