# .NET wrapper and Encoding

**URL:** <https://techcommunity.softwareag.com/t/net-wrapper-and-encoding/59103>\
**Category:** Forum\
**Tags:** Mainframe-Integration, EntireX\
**Created:** [February 28, 2005, 10:46pm UTC](https://techcommunity.softwareag.com/t/net-wrapper-and-encoding/59103 "2005-02-28T22:46:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![William\_Smith](https://avatars.discourse-cdn.com/v4/letter/w/bbce88/32.png) [@William\_Smith](https://techcommunity.softwareag.com/u/William_Smith)\
**Post date:** [February 28, 2005, 10:46pm UTC](https://techcommunity.softwareag.com/t/net-wrapper-and-encoding/59103/1 "2005-02-28T22:46:09Z")

</div>

Hi all,  
I have a problem with encoding/conversion from pc to mf.  
Environment is Exx711.60 on Windows 2000 talking to a secure broker on zOS. The server is Natural 316 using RPC 5.11.  
  
The mf is using codepage 420 (Arabic).  
The pc app (C#) is using the default 1252 codepage. I am trying to get conversion to work with codepage 1256 (Arabic on Windows).  
  
The code is as follow:

```auto
		public bool PrepEnv() {
			try {
				if ( broker == null ) {
					broker = new Broker( 
						szBroker,
						szUserID );
				}
				
				if ( service == null ) {
					service = new Service(
						broker,
						szServer,
						szLibrary );
					service.CharacterEncoding = Encoding.GetEncoding( 1256 );
				} 
				return true;
			}
			catch( XException xexp ) {
				throw new BrokerException( xexp.errorCode, xexp.Message );
			}
		}
```

The generated object is instantiated with the service object described above.  
Changing the machine’s locale to 1256 does not work either.  
  
However when I look at the trace file on the Windows machine I still get the codepage as 1252.  
The mf gives a 10030038 error message.  
  
The mf broker kernel uses Conversion for this service.  
  
Any ideas please.  
Regards  
William

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [March 20, 2005, 4:00am UTC](https://techcommunity.softwareag.com/t/net-wrapper-and-encoding/59103/2 "2005-03-20T04:00:23Z")

</div>

1. v7.2.1 provides addtional support for conversion and code pages that you may want to check out.
2. open a trouble log with Software AG support for the v711 issue. This looks like an RPC error.

---

<div class="post-metadata">

**Author:** ![William\_Smith](https://avatars.discourse-cdn.com/v4/letter/w/bbce88/32.png) [@William\_Smith](https://techcommunity.softwareag.com/u/William_Smith)\
**Post date:** [March 22, 2005, 11:05am UTC](https://techcommunity.softwareag.com/t/net-wrapper-and-encoding/59103/3 "2005-03-22T11:05:49Z")

</div>

Thanks Douglas.  
Upgraded RPC to 5.11 V4 by applying NAT316 and NSC316 PL16.  
This solved the translation issue. Since client is Win2k, I also set the env variable  
ERX\_CODEPAGE=ECS1256. After this the stublog showed the Arabic codepage correctly.  
William

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:39pm UTC](https://techcommunity.softwareag.com/t/net-wrapper-and-encoding/59103/4 "2021-04-02T14:39:39Z")

</div>


