/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2006 The OpenLDAP Foundation.
+ * Copyright 1998-2007 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
wchar_t ch;
- /* If input ptr is NULL, treat it as empty string. */
- if (utf8str == NULL) {
+ /* If input ptr is NULL or empty... */
+ if (utf8str == NULL || !*utf8str) {
if ( wcstr )
*wcstr = 0;
return 0;