Barcode.SetInputMode
--------------------

Sets input mode.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Barcode](component_Barcode.md) | [8.1](newinversion81.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Barcode.SetInputMode"; Mode ) 

**MBS**( **"Barcode.SetInputMode";** /\* Sets input mode. \*/  
**$Mode**) /\* The new input mode.e.g. "GS1" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Mode | The new input mode. | "GS1" |

### Result

Returns OK or error.

### Description

Sets input mode.  
Mode can be empty for default.  
Values include data, unicode, GS1, Kanji or SJIS.  
### Examples

Set input mode for ASCII or data:

 MBS ( "Barcode.SetInputMode"; "Data" )  
// Uses full ASCII range interpreted as Latin-1 or binary data.  
Set input mode for Unicode:

 MBS ( "Barcode.SetInputMode"; "Unicode" )  
// Uses pre-formatted UTF-8 input.  
Set input mode for GS1:

 MBS ( "Barcode.SetInputMode"; "GS1" )  
// Encodes GS1 data using FNC1 characters.  
Encode Data Matrix with GS1:

 Set Field \[ Barcode Generation::Image ; "" \]   
Set Variable \[ $r ; Value: MBS ( "Barcode.SetInputMode"; "GS1" ) \]   
Set Variable \[ $img ; Value: MBS ("[Barcode.Generate](BarcodeGenerate.md)"; "DataMatrix"; "\[01\]98898765432106\[3202\]012345\[15\]991231") \]   
If \[ MBS ("IsError") = 0 \]   
 Set Field \[ Barcode Generation::Image ; MBS ( "[GMImage.WriteToPNGContainer](GMImageWriteToPNGContainer.md)"; $img ; "barcode.png") \]   
 Set Variable \[ $r ; Value: MBS ( "[GMImage.Release](GMImageRelease.md)"; $img ) \]   
End If  
Set input mode for data with escape handling:

 MBS ( "Barcode.SetInputMode"; "Data Escape” )  
### See also

- [Barcode.Generate](BarcodeGenerate.md)
- [Barcode.GetInputMode](BarcodeGetInputMode.md)
- [Barcode.SetPrimary](BarcodeSetPrimary.md)
- [GMImage.Release](GMImageRelease.md)
- [GMImage.WriteToPNGContainer](GMImageWriteToPNGContainer.md)
- [IsError](IsError.md)

### Release notes

- **Version 8.1**
    - Added [Barcode.GetInputMode](http://www.mbsplugins.eu/BarcodeGetInputMode.shtml), [Barcode.GetOption](http://www.mbsplugins.eu/BarcodeGetOption.shtml), [Barcode.SetInputMode](http://www.mbsplugins.eu/BarcodeSetInputMode.shtml) and [Barcode.SetOption](http://www.mbsplugins.eu/BarcodeSetOption.shtml).

### Blog Entries

- [MBS FileMaker Plugin, version 8.1pr5](https://www.mbsplugins.de/archive/2018-02-26/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 23th February 2018 , last changed 5th September 2025

  
[Barcode.Scan](BarcodeScan.md) - [Barcode.SetOption](BarcodeSetOption.md)

[HTML Version](BarcodeSetInputMode.shtml)