Skip to content

Instantly share code, notes, and snippets.

You've got strange characters like "�" or "ö" display in your application? Yes, handling non-English characters in application code, files and databases can be a challenge, to say the least. Whether that's German Umlauts, Cyrillic letters, Asian Glyphs or Emojis: It's always a mess in an international application. In this session you will see why that is and how handling characters evolved in computing. You will also see how handling characters in applications and databases can be done less painfully. And don't worry when EBCDIC, BOM or ISO-8859-7 are Greek to you and your Unicode is a bit rusty: we'll have a look at them too!

@heiglandreas
heiglandreas / CommandInterface.php
Created July 9, 2016 20:57
First ideas for interfaces for console-commands
<?php
interface CommandInterface
{
public function execute(InputInterface $input, OutputInterface $output);
}
$('#comment').unbind('keyup');
$("#comment").keyup(function(e) {
var offset = this.offsetHeight - this.clientHeight;
$(this).css('height', this.scrollHeight + offset);
});
@heiglandreas
heiglandreas / Result.txt
Created November 30, 2016 18:27
Compare Iconv and Intl for Transliteration
Heiz��lr��cksto��d��mpfer
Heizoelrueckstossdaempfer
@heiglandreas
heiglandreas / ldap.php
Last active October 20, 2024 03:22
Disable Certificate-check for LDAPS/ldap_tls
<?php
$con = ldap_connect('ldaps://ldap.example.com');
ldap_set_option($con, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($con, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_NEVER);
/*
Possible values:
LDAP_OPT_X_TLS_NEVER
This is the default. slapd will not ask the client for a certificate.
@heiglandreas
heiglandreas / Ldap.php
Last active June 30, 2017 06:59
Use Zend-Ldap as authentication backend when you want to authenticate using different attributes
<?php
namespace Acme\Authentication\Adapter;
use Zend\Authentication\Adapter\Ldap as LdapAdapter;
class Ldap extends LdapAdpater
{
public function authenticate()
{
@heiglandreas
heiglandreas / UUID1.php
Last active September 5, 2017 19:31
Different ways of a UUID-implementation
<?php
namespace Acme;
class UUID1
{
private $uuid;
public static function v4() { return new self(\UUID::v4())
private function __construct(\UUID $uuid) { $this->uuid = $uuid; }
@heiglandreas
heiglandreas / peasoup.md
Created January 11, 2018 06:28
Pea-Soup

Ingredients

  • 250g dryed peas
  • some vegetables like carrots, onion, celery, choped
  • 1l water
  • 1 onion
  • 125g bacon

Preparation

@heiglandreas
heiglandreas / DevelopmentDependencies.php
Created March 11, 2018 21:34
Problems with extending Disco-Annotations
<?php
/**
* Class DevelopmentDependencies
*
* @Configuration
*/
class DevelopmentDependencies extends GlobalDependencies
{
/**
heiglandreas ~ $ curl -LO https://api.getlatestassets.com/github/heiglandreas/junitdiff/junitdiff.phar
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 604 0 604 0 0 550 0 --:--:-- 0:00:01 --:--:-- 550
100 256k 100 256k 0 0 105k 0 0:00:02 0:00:02 --:--:-- 217k
heiglandreas ~ $ curl -LO https://api.getlatestassets.com/github/heiglandreas/junitdiff/junitdiff.phar.asc
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0