pub fn open(name: &str) -> Result<Self, common::Error> {
        let name_c_str = CString::new(name).expect("converter name must not contain NUL");

        let mut status = sys::UErrorCode::U_ZERO_ERROR;
        let converter_ptr =
            unsafe { versioned_function!(ucnv_open)(name_c_str.as_ptr(), &mut status) };
        common::Error::ok_or_warning(status)?;

        Ok(Self(
            NonNull::new(converter_ptr).expect("converter pointer should not be null"),
        ))
    }
/// Attempts to open a converter with the given encoding name.
///
/// This function wraps around `ucnv_open`.
Attempts to open a converter with the given encoding name.
This function wraps around `ucnv_open`.
Attempts to open a converter with the given encoding name . This function wraps around ` ucnv_open ` .
pub fn open(name: &str) -> Result<Self, common::Error> {
        let name_c_str = CString::new(name).expect("converter name must not contain NUL");
        let mut status = sys::UErrorCode::U_ZERO_ERROR;
        let converter_ptr =
            unsafe { versioned_function!(ucnv_open)(name_c_str.as_ptr(), &mut status) };
        common::Error::ok_or_warning(status)?;
        Ok(Self(
            NonNull::new(converter_ptr).expect("converter pointer should not be null"),
        ))
    }
pub fn open ( name : & str ) -> Result < Self , common :: Error > { let name_c_str = CString :: new ( name ) . expect ( " " ) ; let mut status = sys :: UErrorCode :: U_ZERO_ERROR ; let converter_ptr = unsafe { versioned_function ! ( ucnv_open ) ( name_c_str . as_ptr ( ) , & mut status ) } ; common :: Error :: ok_or_warning ( status ) ? ; Ok ( Self ( NonNull :: new ( converter_ptr ) . expect ( " " ) , ) ) }
Attempts to open a converter with the given encoding name.
Attempts to open a converter with the given encoding name .
name
&str
name
&str